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
Bisexual (Light)
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA activityBar.background
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) activityBar.foreground
#2B71FF RGB(43, 113, 255) RGBA(43, 113, 255, 1) activityBarBadge.background
#D6006F RGB(214, 0, 111) RGBA(214, 0, 111, 1) editor.background
#F3F3F3 RGB(243, 243, 243) RGBA(243, 243, 243, 1) editor.foreground
#D65A9A RGB(214, 90, 154) RGBA(214, 90, 154, 1) editorLineNumber.foreground
#BC84F2 RGB(188, 132, 242) RGBA(188, 132, 242, 1) gitDecoration.modifiedResourceForeground
#D6006F RGB(214, 0, 111) RGBA(214, 0, 111, 1) gitDecoration.untrackedResourceForeground
#2B71FF RGB(43, 113, 255) RGBA(43, 113, 255, 1) list.errorForeground
#D6006F RGB(214, 0, 111) RGBA(214, 0, 111, 1) list.warningForeground
#2B71FF RGB(43, 113, 255) RGBA(43, 113, 255, 1) sideBarTitle.foreground
#FF228C RGB(255, 34, 140) RGBA(255, 34, 140, 1) statusBar.background
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) statusBar.debuggingBackground
#263238 RGB(38, 50, 56) RGBA(38, 50, 56, 1) statusBar.foreground
#2B71FF RGB(43, 113, 255) RGBA(43, 113, 255, 1) statusBar.noFolderBackground
#2B71FF RGB(43, 113, 255) RGBA(43, 113, 255, 1) statusBar.noFolderForeground
#FF228C RGB(255, 34, 140) RGBA(255, 34, 140, 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
#2B71FF RGB(43, 113, 255) RGBA(43, 113, 255, 1) comment.block
#2B71FF RGB(43, 113, 255) RGBA(43, 113, 255, 1) comment.block.documentation
#2B71FF RGB(43, 113, 255) RGBA(43, 113, 255, 1) comment.line
#2B71FF RGB(43, 113, 255) RGBA(43, 113, 255, 1) constant
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) constant.character
#FA4BA5 RGB(250, 75, 165) RGBA(250, 75, 165, 1) constant.character.escape
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) constant.numeric
#FA4BA5 RGB(250, 75, 165) RGBA(250, 75, 165, 1) constant.numeric.integer
#FA4BA5 RGB(250, 75, 165) RGBA(250, 75, 165, 1) constant.numeric.float
#FA4BA5 RGB(250, 75, 165) RGBA(250, 75, 165, 1) constant.numeric.hex
#FA4BA5 RGB(250, 75, 165) RGBA(250, 75, 165, 1) constant.numeric.octal
#FA4BA5 RGB(250, 75, 165) RGBA(250, 75, 165, 1) constant.other
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) constant.other.placeholder
#2B71FF RGB(43, 113, 255) RGBA(43, 113, 255, 1) entity
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) entity.name
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) entity.name.class
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) entity.name.function
#BC84F2 RGB(188, 132, 242) RGBA(188, 132, 242, 1) entity.name.method
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) entity.name.namespace
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) entity.name.section
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) entity.name.selector
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) entity.name.tag
#F759AA RGB(247, 89, 170) RGBA(247, 89, 170, 1) entity.name.type
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) entity.name.type.enum
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) entity.name.type.interface
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) entity.name.type.struct
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) entity.other
#D34B91 RGB(211, 75, 145) RGBA(211, 75, 145, 1) entity.other.attribute-name
#82AAFF RGB(130, 170, 255) RGBA(130, 170, 255, 1) entity.other.inherited-class
#FF4EAA RGB(255, 78, 170) RGBA(255, 78, 170, 1) invalid
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) invalid.deprecated
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) invalid.illegal
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) keyword
#FF0687 RGB(255, 6, 135) RGBA(255, 6, 135, 1) keyword.control
#82AAFF RGB(130, 170, 255) RGBA(130, 170, 255, 1) keyword.control.flow
#82AAFF RGB(130, 170, 255) RGBA(130, 170, 255, 1) keyword.operator
#FF0687 RGB(255, 6, 135) RGBA(255, 6, 135, 1) keyword.operator.new
#FF0687 RGB(255, 6, 135) RGBA(255, 6, 135, 1) keyword.operator.assignment
#FF0687 RGB(255, 6, 135) RGBA(255, 6, 135, 1) keyword.operator.arithmetic
#FF0687 RGB(255, 6, 135) RGBA(255, 6, 135, 1) keyword.operator.logical
#FF0687 RGB(255, 6, 135) RGBA(255, 6, 135, 1) keyword.other
#FA4BA5 RGB(250, 75, 165) RGBA(250, 75, 165, 1) markup
#EEFFFF RGB(238, 255, 255) RGBA(238, 255, 255, 1) markup.bold
#A855DF RGB(168, 85, 223) RGBA(168, 85, 223, 1) markup.changed
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) markup.deleted
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) markup.heading
#FF4EAA RGB(255, 78, 170) RGBA(255, 78, 170, 1) markup.inline.raw
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) markup.inserted
#82AAFF RGB(130, 170, 255) RGBA(130, 170, 255, 1) markup.italic
#A855DF RGB(168, 85, 223) RGBA(168, 85, 223, 1) markup.raw
#EEFFFF RGB(238, 255, 255) RGBA(238, 255, 255, 1) markup.underline
#5C5ADB RGB(92, 90, 219) RGBA(92, 90, 219, 1) markup.underline.link
#5C5ADB RGB(92, 90, 219) RGBA(92, 90, 219, 1) meta
#65737E RGB(101, 115, 126) RGBA(101, 115, 126, 1) meta.function-call
#BC84F2 RGB(188, 132, 242) RGBA(188, 132, 242, 1) meta.tag
#BC84F2 RGB(188, 132, 242) RGBA(188, 132, 242, 1) punctuation.definition.bracket
#BC84F2 RGB(188, 132, 242) RGBA(188, 132, 242, 1) punctuation.definition.comment
#2B71FF RGB(43, 113, 255) RGBA(43, 113, 255, 1) punctuation.definition.string.begin
#BC84F2 RGB(188, 132, 242) RGBA(188, 132, 242, 1) punctuation.definition.string.end
#BC84F2 RGB(188, 132, 242) RGBA(188, 132, 242, 1) punctuation.separator
#BC84F2 RGB(188, 132, 242) RGBA(188, 132, 242, 1) punctuation.separator.continuation
#BC84F2 RGB(188, 132, 242) RGBA(188, 132, 242, 1) punctuation.terminator
#BC84F2 RGB(188, 132, 242) RGBA(188, 132, 242, 1) storage
#FF0687 RGB(255, 6, 135) RGBA(255, 6, 135, 1) storage.modifier
#FF0687 RGB(255, 6, 135) RGBA(255, 6, 135, 1) storage.type
#FF0687 RGB(255, 6, 135) RGBA(255, 6, 135, 1) string
#A855DF RGB(168, 85, 223) RGBA(168, 85, 223, 1) string.interpolated
#A855DF RGB(168, 85, 223) RGBA(168, 85, 223, 1) string.other
#A855DF RGB(168, 85, 223) RGBA(168, 85, 223, 1) string.quoted
#A855DF RGB(168, 85, 223) RGBA(168, 85, 223, 1) string.quoted.double
#A855DF RGB(168, 85, 223) RGBA(168, 85, 223, 1) string.quoted.other
#A855DF RGB(168, 85, 223) RGBA(168, 85, 223, 1) string.quoted.single
#A855DF RGB(168, 85, 223) RGBA(168, 85, 223, 1) string.quoted.triple
#A855DF RGB(168, 85, 223) RGBA(168, 85, 223, 1) string.regexp
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) string.template
#A855DF RGB(168, 85, 223) RGBA(168, 85, 223, 1) string.unquoted
#A855DF RGB(168, 85, 223) RGBA(168, 85, 223, 1) support
#D5B7E9 RGB(213, 183, 233) RGBA(213, 183, 233, 1) support.class
#FA4BA5 RGB(250, 75, 165) RGBA(250, 75, 165, 1) support.constant
#FA4BA5 RGB(250, 75, 165) RGBA(250, 75, 165, 1) support.function
#BC84F2 RGB(188, 132, 242) RGBA(188, 132, 242, 1) support.other
#FA4BA5 RGB(250, 75, 165) RGBA(250, 75, 165, 1) support.type
#1F44BE RGB(31, 68, 190) RGBA(31, 68, 190, 1) support.type.primitive
#1F44BE RGB(31, 68, 190) RGBA(31, 68, 190, 1) support.type.property-name
#6497FF RGB(100, 151, 255) RGBA(100, 151, 255, 1) variable
#2B71FF RGB(43, 113, 255) RGBA(43, 113, 255, 1) variable.function
#BC84F2 RGB(188, 132, 242) RGBA(188, 132, 242, 1) variable.language
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) variable.name
#2B71FF RGB(43, 113, 255) RGBA(43, 113, 255, 1) variable.other
#528CFF RGB(82, 140, 255) RGBA(82, 140, 255, 1) variable.other.constant
#528CFF RGB(82, 140, 255) RGBA(82, 140, 255, 1) variable.other.property
#528CFF RGB(82, 140, 255) RGBA(82, 140, 255, 1) variable.other.readwrite
#528CFF RGB(82, 140, 255) RGBA(82, 140, 255, 1) variable.parameter
#FA4BA5 RGB(250, 75, 165) RGBA(250, 75, 165, 1)