VS Code preview Full workbench mockup using this variant's colors and tokenColors.
fetchUser.tssrc/components index.ts README.md
src
components fetchUser.ts Button.tsx Modal.tsx legacy.tsx fetch Config.tsindex.ts renamed.ts staged.ts removed.ts
vendor package.json broken.ts slow.ts tsconfig.json README.md package-lock.json 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
export interface User {
id : string ;
name : string ;
role : " admin " | " member " ;
tags : string [] ;
}
/**
* Fetch user data by ID
* @ param id
* @ returns User object or null if ID is invalid
*/
export async function fetchUser ( id : string ): Promise < User | null > {
if ( ! id ) {
return null ;
}
const response = await fetch ( ` /api/users/ ${ id }` , {
method : " GET " ,
headers : { Accept : " application/json " },
} ) ;
if ( ! response . ok ) {
throw new Error ( ` HTTP ${ response . status }` ) ;
}
return ( await response . json ()) as User ;
}
function greet ( user : User ): string {
// Simple greeting function that uses the user's name
return ` Hello, ${ user . name } ! ` ;
}
Problems1
Output
Debug Console
Terminal
Ports
✓ fetchUser passed 12 blk
✗ Cannot find name 'user'. error ▲ warning 412 ready localhost
Ln 5, Col 12
Spaces: 2
UTF-8
LF
TypeScript
Leuven Light
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA diffEditor.insertedTextBackground
#DDFFDDAA RGB(221, 255, 221) RGBA(221, 255, 221, 0.667) diffEditor.removedTextBackground
#FEE8E9AA RGB(254, 232, 233) RGBA(254, 232, 233, 0.667) editor.background
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) editor.foreground
#333333 RGB(51, 51, 51) RGBA(51, 51, 51, 1) editor.lineHighlightBackground
#F6FECDAA RGB(246, 254, 205) RGBA(246, 254, 205, 0.667) editor.selectionBackground
#8ED3FF RGB(142, 211, 255) RGBA(142, 211, 255, 1) editor.selectionForeground
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) editor.selectionHighlightBackground
#FFFF00AA RGB(255, 255, 0) RGBA(255, 255, 0, 0.667) editor.wordHighlightBackground
#E6ECFFAA RGB(230, 236, 255) RGBA(230, 236, 255, 0.667) editorBracketMatch.background
#C0E8C3 RGB(192, 232, 195) RGBA(192, 232, 195, 1) editorBracketMatch.border
#FFA5A5 RGB(255, 165, 165) RGBA(255, 165, 165, 1) editorCursor.background
#21BDFF RGB(33, 189, 255) RGBA(33, 189, 255, 1) editorError.foreground
#FE251E RGB(254, 37, 30) RGBA(254, 37, 30, 1) editorInfo.foreground
#158A15 RGB(21, 138, 21) RGBA(21, 138, 21, 1) editorSuggestWidget.focusHighlightForeground
#9DDDFF RGB(157, 221, 255) RGBA(157, 221, 255, 1) editorWarning.foreground
#F4A939 RGB(244, 169, 57) RGBA(244, 169, 57, 1) list.focusHighlightForeground
#9DDDFF RGB(157, 221, 255) RGBA(157, 221, 255, 1)
tokenColors Foregrounds this theme assigns to the token scope catalog. A rule with only a font style is skipped, and a longer matching scope wins. Italic and bold rules are not listed — the preview above shows them in the code.
scope HEX RGB RGBA comment
#8D8D84 RGB(141, 141, 132) RGBA(141, 141, 132, 1) comment.block
#8D8D84 RGB(141, 141, 132) RGBA(141, 141, 132, 1) comment.block.documentation
#8D8D84 RGB(141, 141, 132) RGBA(141, 141, 132, 1) comment.line
#8D8D84 RGB(141, 141, 132) RGBA(141, 141, 132, 1) constant
#AB6526 RGB(171, 101, 38) RGBA(171, 101, 38, 1) constant.character
#AB6526 RGB(171, 101, 38) RGBA(171, 101, 38, 1) constant.character.escape
#777777 RGB(119, 119, 119) RGBA(119, 119, 119, 1) constant.numeric
#AB6526 RGB(171, 101, 38) RGBA(171, 101, 38, 1) constant.numeric.integer
#AB6526 RGB(171, 101, 38) RGBA(171, 101, 38, 1) constant.numeric.float
#AB6526 RGB(171, 101, 38) RGBA(171, 101, 38, 1) constant.numeric.hex
#AB6526 RGB(171, 101, 38) RGBA(171, 101, 38, 1) constant.numeric.octal
#AB6526 RGB(171, 101, 38) RGBA(171, 101, 38, 1) constant.other
#00AA00 RGB(0, 170, 0) RGBA(0, 170, 0, 1) constant.other.placeholder
#00AA00 RGB(0, 170, 0) RGBA(0, 170, 0, 1) constant.regexp
#AB6526 RGB(171, 101, 38) RGBA(171, 101, 38, 1) constant.rgb-value
#AB6526 RGB(171, 101, 38) RGBA(171, 101, 38, 1) entity
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) entity.name
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) entity.name.class
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) entity.name.function
#006699 RGB(0, 102, 153) RGBA(0, 102, 153, 1) entity.name.method
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) entity.name.namespace
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) entity.name.section
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) entity.name.selector
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) entity.name.tag
#4B83CD RGB(75, 131, 205) RGBA(75, 131, 205, 1) entity.name.type
#6434A3 RGB(100, 52, 163) RGBA(100, 52, 163, 1) entity.name.type.enum
#6434A3 RGB(100, 52, 163) RGBA(100, 52, 163, 1) entity.name.type.interface
#6434A3 RGB(100, 52, 163) RGBA(100, 52, 163, 1) entity.name.type.struct
#6434A3 RGB(100, 52, 163) RGBA(100, 52, 163, 1) entity.other
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) entity.other.attribute-name
#F36335 RGB(243, 99, 53) RGBA(243, 99, 53, 1) entity.other.inherited-class
#6434A3 RGB(100, 52, 163) RGBA(100, 52, 163, 1) invalid
#FF0000 RGB(255, 0, 0) RGBA(255, 0, 0, 1) invalid.illegal
#FF0000 RGB(255, 0, 0) RGBA(255, 0, 0, 1) keyword
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) keyword.control
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) keyword.control.flow
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) keyword.operator
#777777 RGB(119, 119, 119) RGBA(119, 119, 119, 1) keyword.operator.new
#777777 RGB(119, 119, 119) RGBA(119, 119, 119, 1) keyword.operator.assignment
#777777 RGB(119, 119, 119) RGBA(119, 119, 119, 1) keyword.operator.arithmetic
#777777 RGB(119, 119, 119) RGBA(119, 119, 119, 1) keyword.operator.logical
#777777 RGB(119, 119, 119) RGBA(119, 119, 119, 1) keyword.other
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) markup
#006400 RGB(0, 100, 0) RGBA(0, 100, 0, 1) markup.changed
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) markup.deleted
#CC3333 RGB(204, 51, 51) RGBA(204, 51, 51, 1) markup.heading
#2A489E RGB(42, 72, 158) RGBA(42, 72, 158, 1) markup.inline.raw
#006400 RGB(0, 100, 0) RGBA(0, 100, 0, 1) markup.inserted
#3A993A RGB(58, 153, 58) RGBA(58, 153, 58, 1) markup.quote
#006400 RGB(0, 100, 0) RGBA(0, 100, 0, 1) markup.raw
#006400 RGB(0, 100, 0) RGBA(0, 100, 0, 1) markup.underline
#006DAF RGB(0, 109, 175) RGBA(0, 109, 175, 1) markup.underline.link
#006DAF RGB(0, 109, 175) RGBA(0, 109, 175, 1) meta
#434343 RGB(67, 67, 67) RGBA(67, 67, 67, 1) meta.selector
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) meta.tag
#AE1B9A RGB(174, 27, 154) RGBA(174, 27, 154, 1) punctuation.definition.bracket
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) punctuation.definition.comment
#8D8D84 RGB(141, 141, 132) RGBA(141, 141, 132, 1) punctuation.definition.string.begin
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) punctuation.definition.string.end
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) punctuation.separator
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) punctuation.separator.continuation
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) punctuation.terminator
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) storage
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) storage.modifier
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) storage.type
#6434A3 RGB(100, 52, 163) RGBA(100, 52, 163, 1) string
#7F7F7F RGB(127, 127, 127) RGBA(127, 127, 127, 1) string.interpolated
#7F7F7F RGB(127, 127, 127) RGBA(127, 127, 127, 1) string.other
#7F7F7F RGB(127, 127, 127) RGBA(127, 127, 127, 1) string.quoted
#7F7F7F RGB(127, 127, 127) RGBA(127, 127, 127, 1) string.quoted.double
#7F7F7F RGB(127, 127, 127) RGBA(127, 127, 127, 1) string.quoted.other
#7F7F7F RGB(127, 127, 127) RGBA(127, 127, 127, 1) string.quoted.single
#7F7F7F RGB(127, 127, 127) RGBA(127, 127, 127, 1) string.quoted.triple
#7F7F7F RGB(127, 127, 127) RGBA(127, 127, 127, 1) string.regexp
#4B83CD RGB(75, 131, 205) RGBA(75, 131, 205, 1) string.template
#7F7F7F RGB(127, 127, 127) RGBA(127, 127, 127, 1) string.unquoted
#7F7F7F RGB(127, 127, 127) RGBA(127, 127, 127, 1) support
#00AA00 RGB(0, 170, 0) RGBA(0, 170, 0, 1) support.class
#6434A3 RGB(100, 52, 163) RGBA(100, 52, 163, 1) support.constant
#D0372D RGB(208, 55, 45) RGBA(208, 55, 45, 1) support.function
#006699 RGB(0, 102, 153) RGBA(0, 102, 153, 1) support.type
#6434A3 RGB(100, 52, 163) RGBA(100, 52, 163, 1) support.type.primitive
#6434A3 RGB(100, 52, 163) RGBA(100, 52, 163, 1) support.type.property-name
#AB6526 RGB(171, 101, 38) RGBA(171, 101, 38, 1) support.variable
#BA36A5 RGB(186, 54, 165) RGBA(186, 54, 165, 1) variable
#BA36A5 RGB(186, 54, 165) RGBA(186, 54, 165, 1) variable.function
#BA36A5 RGB(186, 54, 165) RGBA(186, 54, 165, 1) variable.language
#D0372D RGB(208, 55, 45) RGBA(208, 55, 45, 1) variable.name
#BA36A5 RGB(186, 54, 165) RGBA(186, 54, 165, 1) variable.other
#BA36A5 RGB(186, 54, 165) RGBA(186, 54, 165, 1) variable.other.constant
#BA36A5 RGB(186, 54, 165) RGBA(186, 54, 165, 1) variable.other.property
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) variable.other.readwrite
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) variable.parameter
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1)