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
Royal Dye
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA activityBarBadge.background
#5A411E RGB(90, 65, 30) RGBA(90, 65, 30, 1) editor.background
#F1EAF3 RGB(241, 234, 243) RGBA(241, 234, 243, 1) editor.foreground
#161415 RGB(22, 20, 21) RGBA(22, 20, 21, 1) sideBarTitle.foreground
#F1BCB4 RGB(241, 188, 180) RGBA(241, 188, 180, 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
#573B1D RGB(87, 59, 29) RGBA(87, 59, 29, 1) comment.block
#573B1D RGB(87, 59, 29) RGBA(87, 59, 29, 1) comment.block.documentation
#573B1D RGB(87, 59, 29) RGBA(87, 59, 29, 1) comment.line
#573B1D RGB(87, 59, 29) RGBA(87, 59, 29, 1) constant
#161415 RGB(22, 20, 21) RGBA(22, 20, 21, 1) constant.character
#5A411E RGB(90, 65, 30) RGBA(90, 65, 30, 1) constant.character.escape
#161415 RGB(22, 20, 21) RGBA(22, 20, 21, 1) constant.numeric
#5A411E RGB(90, 65, 30) RGBA(90, 65, 30, 1) constant.numeric.integer
#5A411E RGB(90, 65, 30) RGBA(90, 65, 30, 1) constant.numeric.float
#5A411E RGB(90, 65, 30) RGBA(90, 65, 30, 1) constant.numeric.hex
#5A411E RGB(90, 65, 30) RGBA(90, 65, 30, 1) constant.numeric.octal
#5A411E RGB(90, 65, 30) RGBA(90, 65, 30, 1) constant.other
#161415 RGB(22, 20, 21) RGBA(22, 20, 21, 1) constant.other.placeholder
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) entity
#DCA39C RGB(220, 163, 156) RGBA(220, 163, 156, 1) entity.name
#DCA39C RGB(220, 163, 156) RGBA(220, 163, 156, 1) entity.name.class
#DCA39C RGB(220, 163, 156) RGBA(220, 163, 156, 1) entity.name.function
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) entity.name.method
#DCA39C RGB(220, 163, 156) RGBA(220, 163, 156, 1) entity.name.namespace
#DCA39C RGB(220, 163, 156) RGBA(220, 163, 156, 1) entity.name.section
#DCA39C RGB(220, 163, 156) RGBA(220, 163, 156, 1) entity.name.selector
#DCA39C RGB(220, 163, 156) RGBA(220, 163, 156, 1) entity.name.tag
#5A411E RGB(90, 65, 30) RGBA(90, 65, 30, 1) entity.name.type
#DCA39C RGB(220, 163, 156) RGBA(220, 163, 156, 1) entity.name.type.enum
#DCA39C RGB(220, 163, 156) RGBA(220, 163, 156, 1) entity.name.type.interface
#DCA39C RGB(220, 163, 156) RGBA(220, 163, 156, 1) entity.name.type.struct
#DCA39C RGB(220, 163, 156) RGBA(220, 163, 156, 1) entity.other
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) entity.other.attribute-name
#C5C0C1 RGB(197, 192, 193) RGBA(197, 192, 193, 1) entity.other.inherited-class
#DCA39C RGB(220, 163, 156) RGBA(220, 163, 156, 1) invalid
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) invalid.deprecated
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) invalid.illegal
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) keyword
#161415 RGB(22, 20, 21) RGBA(22, 20, 21, 1) keyword.control
#1B1A19 RGB(27, 26, 25) RGBA(27, 26, 25, 1) keyword.control.flow
#1B1A19 RGB(27, 26, 25) RGBA(27, 26, 25, 1) keyword.operator
#161415 RGB(22, 20, 21) RGBA(22, 20, 21, 1) keyword.operator.new
#161415 RGB(22, 20, 21) RGBA(22, 20, 21, 1) keyword.operator.assignment
#161415 RGB(22, 20, 21) RGBA(22, 20, 21, 1) keyword.operator.arithmetic
#161415 RGB(22, 20, 21) RGBA(22, 20, 21, 1) keyword.operator.logical
#161415 RGB(22, 20, 21) RGBA(22, 20, 21, 1) keyword.other
#5A411E RGB(90, 65, 30) RGBA(90, 65, 30, 1) markup
#573B1D RGB(87, 59, 29) RGBA(87, 59, 29, 1) markup.bold
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) markup.changed
#DCA39C RGB(220, 163, 156) RGBA(220, 163, 156, 1) markup.deleted
#161415 RGB(22, 20, 21) RGBA(22, 20, 21, 1) markup.heading
#DCA39C RGB(220, 163, 156) RGBA(220, 163, 156, 1) markup.inline.raw
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) markup.inserted
#F1BCB4 RGB(241, 188, 180) RGBA(241, 188, 180, 1) markup.italic
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) markup.raw
#1B1A19 RGB(27, 26, 25) RGBA(27, 26, 25, 1) markup.underline
#D0C7D1 RGB(208, 199, 209) RGBA(208, 199, 209, 1) markup.underline.link
#D0C7D1 RGB(208, 199, 209) RGBA(208, 199, 209, 1) meta
#A4885F RGB(164, 136, 95) RGBA(164, 136, 95, 1) meta.function-call
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) meta.tag
#1B1A19 RGB(27, 26, 25) RGBA(27, 26, 25, 1) punctuation.definition.bracket
#1B1A19 RGB(27, 26, 25) RGBA(27, 26, 25, 1) punctuation.definition.comment
#573B1D RGB(87, 59, 29) RGBA(87, 59, 29, 1) punctuation.definition.string.begin
#1B1A19 RGB(27, 26, 25) RGBA(27, 26, 25, 1) punctuation.definition.string.end
#1B1A19 RGB(27, 26, 25) RGBA(27, 26, 25, 1) punctuation.separator
#1B1A19 RGB(27, 26, 25) RGBA(27, 26, 25, 1) punctuation.separator.continuation
#1B1A19 RGB(27, 26, 25) RGBA(27, 26, 25, 1) punctuation.terminator
#1B1A19 RGB(27, 26, 25) RGBA(27, 26, 25, 1) storage
#161415 RGB(22, 20, 21) RGBA(22, 20, 21, 1) storage.modifier
#161415 RGB(22, 20, 21) RGBA(22, 20, 21, 1) storage.type
#161415 RGB(22, 20, 21) RGBA(22, 20, 21, 1) string
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) string.interpolated
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) string.other
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) string.quoted
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) string.quoted.double
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) string.quoted.other
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) string.quoted.single
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) string.quoted.triple
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) string.regexp
#1B1A19 RGB(27, 26, 25) RGBA(27, 26, 25, 1) string.template
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) string.unquoted
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) support
#D0C7D1 RGB(208, 199, 209) RGBA(208, 199, 209, 1) support.class
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) support.constant
#5A411E RGB(90, 65, 30) RGBA(90, 65, 30, 1) support.function
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) support.other
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) support.type
#5A411E RGB(90, 65, 30) RGBA(90, 65, 30, 1) support.type.primitive
#5A411E RGB(90, 65, 30) RGBA(90, 65, 30, 1) support.type.property-name
#D0C7D1 RGB(208, 199, 209) RGBA(208, 199, 209, 1) variable
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) variable.function
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) variable.language
#DCA39C RGB(220, 163, 156) RGBA(220, 163, 156, 1) variable.name
#CE7366 RGB(206, 115, 102) RGBA(206, 115, 102, 1) variable.other
#F1BCB4 RGB(241, 188, 180) RGBA(241, 188, 180, 1) variable.other.constant
#F1BCB4 RGB(241, 188, 180) RGBA(241, 188, 180, 1) variable.other.property
#F1BCB4 RGB(241, 188, 180) RGBA(241, 188, 180, 1) variable.other.readwrite
#F1BCB4 RGB(241, 188, 180) RGBA(241, 188, 180, 1) variable.parameter
#5A411E RGB(90, 65, 30) RGBA(90, 65, 30, 1)