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
Py Light
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA editor.background
#EEFFCC RGB(238, 255, 204) RGBA(238, 255, 204, 1) editor.foreground
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 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
#408090 RGB(64, 128, 144) RGBA(64, 128, 144, 1) comment.block
#408090 RGB(64, 128, 144) RGBA(64, 128, 144, 1) comment.block.documentation
#408090 RGB(64, 128, 144) RGBA(64, 128, 144, 1) comment.line
#408090 RGB(64, 128, 144) RGBA(64, 128, 144, 1) constant
#208050 RGB(32, 128, 80) RGBA(32, 128, 80, 1) constant.character
#208050 RGB(32, 128, 80) RGBA(32, 128, 80, 1) constant.character.escape
#4070A0 RGB(64, 112, 160) RGBA(64, 112, 160, 1) constant.numeric
#208050 RGB(32, 128, 80) RGBA(32, 128, 80, 1) constant.numeric.integer
#208050 RGB(32, 128, 80) RGBA(32, 128, 80, 1) constant.numeric.float
#208050 RGB(32, 128, 80) RGBA(32, 128, 80, 1) constant.numeric.hex
#208050 RGB(32, 128, 80) RGBA(32, 128, 80, 1) constant.numeric.octal
#208050 RGB(32, 128, 80) RGBA(32, 128, 80, 1) constant.other
#4070A0 RGB(64, 112, 160) RGBA(64, 112, 160, 1) constant.other.placeholder
#4070A0 RGB(64, 112, 160) RGBA(64, 112, 160, 1) constant.regexp
#208050 RGB(32, 128, 80) RGBA(32, 128, 80, 1) constant.rgb-value
#208050 RGB(32, 128, 80) RGBA(32, 128, 80, 1) entity
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) entity.name
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) entity.name.class
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) entity.name.function
#06287E RGB(6, 40, 126) RGBA(6, 40, 126, 1) entity.name.method
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) entity.name.namespace
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) entity.name.section
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) entity.name.selector
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) entity.name.tag
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) entity.name.type
#0E84B5 RGB(14, 132, 181) RGBA(14, 132, 181, 1) entity.name.type.enum
#0E84B5 RGB(14, 132, 181) RGBA(14, 132, 181, 1) entity.name.type.interface
#0E84B5 RGB(14, 132, 181) RGBA(14, 132, 181, 1) entity.name.type.struct
#0E84B5 RGB(14, 132, 181) RGBA(14, 132, 181, 1) entity.other
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) entity.other.attribute-name
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) entity.other.inherited-class
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 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
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) keyword.control
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) keyword.control.flow
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) keyword.operator
#666666 RGB(102, 102, 102) RGBA(102, 102, 102, 1) keyword.operator.new
#666666 RGB(102, 102, 102) RGBA(102, 102, 102, 1) keyword.operator.assignment
#666666 RGB(102, 102, 102) RGBA(102, 102, 102, 1) keyword.operator.arithmetic
#666666 RGB(102, 102, 102) RGBA(102, 102, 102, 1) keyword.operator.logical
#666666 RGB(102, 102, 102) RGBA(102, 102, 102, 1) keyword.other
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) markup
#C65D09 RGB(198, 93, 9) RGBA(198, 93, 9, 1) markup.bold
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) markup.changed
#0044DD RGB(0, 68, 221) RGBA(0, 68, 221, 1) markup.deleted
#A00000 RGB(160, 0, 0) RGBA(160, 0, 0, 1) markup.heading
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) markup.inline.raw
#C65D09 RGB(198, 93, 9) RGBA(198, 93, 9, 1) markup.inserted
#00A000 RGB(0, 160, 0) RGBA(0, 160, 0, 1) markup.italic
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) markup.list
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) markup.list.numbered
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) markup.list.unnumbered
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) markup.quote
#408090 RGB(64, 128, 144) RGBA(64, 128, 144, 1) markup.raw
#333333 RGB(51, 51, 51) RGBA(51, 51, 51, 1) meta
#434343 RGB(67, 67, 67) RGBA(67, 67, 67, 1) meta.selector
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) meta.tag
#666666 RGB(102, 102, 102) RGBA(102, 102, 102, 1) punctuation.definition.bracket
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) punctuation.definition.comment
#408090 RGB(64, 128, 144) RGBA(64, 128, 144, 1) punctuation.definition.string.begin
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) punctuation.definition.string.end
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) punctuation.separator
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) punctuation.separator.continuation
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) punctuation.terminator
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) storage
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) storage.modifier
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) storage.type
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) string
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) string.interpolated
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) string.other
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) string.quoted
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) string.quoted.double
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) string.quoted.other
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) string.quoted.single
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) string.quoted.triple
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) string.regexp
#235388 RGB(35, 83, 136) RGBA(35, 83, 136, 1) string.template
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) string.unquoted
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) support
#4070A0 RGB(64, 112, 160) RGBA(64, 112, 160, 1) support.class
#0E84B5 RGB(14, 132, 181) RGBA(14, 132, 181, 1) support.constant
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) support.function
#06287E RGB(6, 40, 126) RGBA(6, 40, 126, 1) support.type
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) support.type.primitive
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) support.type.property-name
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) support.variable
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) variable
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) variable.function
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) variable.language
#007020 RGB(0, 112, 32) RGBA(0, 112, 32, 1) variable.name
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) variable.other
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) variable.other.constant
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 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)