Skip to content

Commit

Permalink
fix(repl): type indication for AstNode (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
Artxe2 authored Dec 29, 2023
1 parent a274167 commit 841a916
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/repl/src/lib/Output/AstNode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { tick } from 'svelte';
export let key = '';
/** @type {import('svelte/types/compiler/interfaces').Ast} */
/** @type {import('svelte/types/compiler/interfaces').Ast & { type?: string }} */
export let value;
export let collapsed = true;
/** @type {import('svelte/types/compiler/interfaces').Ast[]} */
Expand Down Expand Up @@ -93,9 +93,15 @@
{#if is_collapsable}
{#if collapsed && !is_root}
<button class="preview" on:click={() => (collapsed = !collapsed)}>
{#if value.type}
<span class="token string">{value.type} </span>
{/if}
{preview_text}
</button>
{:else}
{#if value.type}
<span class="token string">{value.type} </span>
{/if}
<span>{is_ast_array ? '[' : '{'}</span>
<ul>
{#each Object.entries(value) as [k, v]}
Expand Down

2 comments on commit 841a916

@vercel
Copy link

@vercel vercel bot commented on 841a916 Dec 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

repl – ./packages/repl

repl-svelte.vercel.app
repl-zeta.vercel.app
svelte-rappel.vercel.app
repl-git-master-svelte.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 841a916 Dec 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hn – ./sites/hn.svelte.dev

hn-git-master-svelte.vercel.app
sites-zeta.vercel.app
hn-svelte.vercel.app
hn.svelte.dev

Please sign in to comment.