File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
packages/repl/src/lib/Output Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 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 >
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
Original file line number Diff line number Diff line change 155155 return { type : 'Set' , value } ;
156156 }
157157
158+ // if we don't handle bigints separately, they will cause JSON.stringify to blow up
159+ if ( typeof value === 'bigint' ) {
160+ return { type : 'BigInt' , value : value + '' } ;
161+ }
162+
158163 return value ;
159164 } ) ;
160165 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments