Skip to content

Commit fbcca03

Browse files
committed
handle bigints in AST output tab
1 parent 83ae719 commit fbcca03

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/repl/src/lib/Output/AstNode.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
<span class="token comment">{String(value)}</span>
9393
{:else}
9494
<span class="token {typeof value}">
95-
{JSON.stringify(value)}
95+
{typeof value === 'bigint' ? `${value}n` : JSON.stringify(value)}
9696
</span>
9797
{/if}
9898
</span>
@@ -170,7 +170,8 @@
170170
color: var(--shiki-token-string);
171171
}
172172
173-
.token.number {
173+
.token.number,
174+
.token.bigint {
174175
color: var(--shiki-token-constant);
175176
}
176177

0 commit comments

Comments
 (0)