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
sofetch
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA editor.background
#F5F5F5 RGB(245, 245, 245) RGBA(245, 245, 245, 1) editor.foreground
#294429 RGB(41, 68, 41) RGBA(41, 68, 41, 1) editor.selectionBackground
#294429 RGB(41, 68, 41) RGBA(41, 68, 41, 1) editor.selectionForeground
#F5F5F5 RGB(245, 245, 245) RGBA(245, 245, 245, 1) list.activeSelectionIconForeground
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 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
#ABA99E RGB(171, 169, 158) RGBA(171, 169, 158, 1) comment.block
#ABA99E RGB(171, 169, 158) RGBA(171, 169, 158, 1) comment.block.documentation
#2B4B39 RGB(43, 75, 57) RGBA(43, 75, 57, 1) comment.line
#ABA99E RGB(171, 169, 158) RGBA(171, 169, 158, 1) constant
#2B4B39 RGB(43, 75, 57) RGBA(43, 75, 57, 1) constant.character
#2B4B39 RGB(43, 75, 57) RGBA(43, 75, 57, 1) constant.character.escape
#75A14C RGB(117, 161, 76) RGBA(117, 161, 76, 1) constant.numeric
#2B4B39 RGB(43, 75, 57) RGBA(43, 75, 57, 1) constant.numeric.integer
#2B4B39 RGB(43, 75, 57) RGBA(43, 75, 57, 1) constant.numeric.float
#2B4B39 RGB(43, 75, 57) RGBA(43, 75, 57, 1) constant.numeric.hex
#2B4B39 RGB(43, 75, 57) RGBA(43, 75, 57, 1) constant.numeric.octal
#2B4B39 RGB(43, 75, 57) RGBA(43, 75, 57, 1) constant.other
#2B4B39 RGB(43, 75, 57) RGBA(43, 75, 57, 1) constant.other.placeholder
#2B4B39 RGB(43, 75, 57) RGBA(43, 75, 57, 1) constant.regexp
#2B4B39 RGB(43, 75, 57) RGBA(43, 75, 57, 1) constant.rgb-value
#2B4B39 RGB(43, 75, 57) RGBA(43, 75, 57, 1) entity
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) entity.name
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) entity.name.class
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) entity.name.function
#007500 RGB(0, 117, 0) RGBA(0, 117, 0, 1) entity.name.method
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) entity.name.namespace
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) entity.name.section
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) entity.name.selector
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) entity.name.tag
#007500 RGB(0, 117, 0) RGBA(0, 117, 0, 1) entity.name.type
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) entity.name.type.enum
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) entity.name.type.interface
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) entity.name.type.struct
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) entity.other
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) entity.other.attribute-name
#91B3E0 RGB(145, 179, 224) RGBA(145, 179, 224, 1) entity.other.inherited-class
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) invalid
#660000 RGB(102, 0, 0) RGBA(102, 0, 0, 1) invalid.illegal
#660000 RGB(102, 0, 0) RGBA(102, 0, 0, 1) keyword
#294429 RGB(41, 68, 41) RGBA(41, 68, 41, 1) keyword.control
#294429 RGB(41, 68, 41) RGBA(41, 68, 41, 1) keyword.control.flow
#294429 RGB(41, 68, 41) RGBA(41, 68, 41, 1) keyword.operator
#75A14C RGB(117, 161, 76) RGBA(117, 161, 76, 1) keyword.operator.new
#75A14C RGB(117, 161, 76) RGBA(117, 161, 76, 1) keyword.operator.assignment
#75A14C RGB(117, 161, 76) RGBA(117, 161, 76, 1) keyword.operator.arithmetic
#75A14C RGB(117, 161, 76) RGBA(117, 161, 76, 1) keyword.operator.logical
#75A14C RGB(117, 161, 76) RGBA(117, 161, 76, 1) keyword.other
#294429 RGB(41, 68, 41) RGBA(41, 68, 41, 1) markup
#2B4B39 RGB(43, 75, 57) RGBA(43, 75, 57, 1) markup.bold
#2B4B39 RGB(43, 75, 57) RGBA(43, 75, 57, 1) markup.changed
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) markup.deleted
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) markup.heading
#007500 RGB(0, 117, 0) RGBA(0, 117, 0, 1) markup.inline.raw
#2B4B39 RGB(43, 75, 57) RGBA(43, 75, 57, 1) markup.inserted
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) markup.italic
#2B4B39 RGB(43, 75, 57) RGBA(43, 75, 57, 1) markup.list
#4B83CD RGB(75, 131, 205) RGBA(75, 131, 205, 1) markup.list.numbered
#4B83CD RGB(75, 131, 205) RGBA(75, 131, 205, 1) markup.list.unnumbered
#4B83CD RGB(75, 131, 205) RGBA(75, 131, 205, 1) markup.quote
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) markup.raw
#75A14C RGB(117, 161, 76) RGBA(117, 161, 76, 1) meta
#434343 RGB(67, 67, 67) RGBA(67, 67, 67, 1) meta.selector
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) meta.tag
#91B3E0 RGB(145, 179, 224) RGBA(145, 179, 224, 1) punctuation.definition.bracket
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) punctuation.definition.comment
#ABA99E RGB(171, 169, 158) RGBA(171, 169, 158, 1) punctuation.definition.string.begin
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) punctuation.definition.string.end
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) punctuation.separator
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) punctuation.separator.continuation
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) punctuation.terminator
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) storage
#294429 RGB(41, 68, 41) RGBA(41, 68, 41, 1) storage.modifier
#294429 RGB(41, 68, 41) RGBA(41, 68, 41, 1) storage.type
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) string
#ABA99E RGB(171, 169, 158) RGBA(171, 169, 158, 1) string.interpolated
#ABA99E RGB(171, 169, 158) RGBA(171, 169, 158, 1) string.other
#ABA99E RGB(171, 169, 158) RGBA(171, 169, 158, 1) string.quoted
#ABA99E RGB(171, 169, 158) RGBA(171, 169, 158, 1) string.quoted.double
#ABA99E RGB(171, 169, 158) RGBA(171, 169, 158, 1) string.quoted.other
#ABA99E RGB(171, 169, 158) RGBA(171, 169, 158, 1) string.quoted.single
#ABA99E RGB(171, 169, 158) RGBA(171, 169, 158, 1) string.quoted.triple
#ABA99E RGB(171, 169, 158) RGBA(171, 169, 158, 1) string.regexp
#4B83CD RGB(75, 131, 205) RGBA(75, 131, 205, 1) string.template
#ABA99E RGB(171, 169, 158) RGBA(171, 169, 158, 1) string.unquoted
#ABA99E RGB(171, 169, 158) RGBA(171, 169, 158, 1) support
#2B4B39 RGB(43, 75, 57) RGBA(43, 75, 57, 1) support.class
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) support.constant
#C09000 RGB(192, 144, 0) RGBA(192, 144, 0, 1) support.function
#007500 RGB(0, 117, 0) RGBA(0, 117, 0, 1) support.type
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) support.type.primitive
#002E21 RGB(0, 46, 33) RGBA(0, 46, 33, 1) support.type.property-name
#007500 RGB(0, 117, 0) RGBA(0, 117, 0, 1) support.variable
#C09000 RGB(192, 144, 0) RGBA(192, 144, 0, 1) variable
#C09000 RGB(192, 144, 0) RGBA(192, 144, 0, 1) variable.function
#C09000 RGB(192, 144, 0) RGBA(192, 144, 0, 1) variable.language
#C09000 RGB(192, 144, 0) RGBA(192, 144, 0, 1) variable.name
#C09000 RGB(192, 144, 0) RGBA(192, 144, 0, 1) variable.other
#C09000 RGB(192, 144, 0) RGBA(192, 144, 0, 1) variable.other.constant
#C09000 RGB(192, 144, 0) RGBA(192, 144, 0, 1) variable.other.property
#C09000 RGB(192, 144, 0) RGBA(192, 144, 0, 1) variable.other.readwrite
#C09000 RGB(192, 144, 0) RGBA(192, 144, 0, 1) variable.parameter
#C09000 RGB(192, 144, 0) RGBA(192, 144, 0, 1)