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
Chrome Devtools Light
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA activityBar.background
#EEEEEE RGB(238, 238, 238) RGBA(238, 238, 238, 1) activityBar.foreground
#808080 RGB(128, 128, 128) RGBA(128, 128, 128, 1) activityBarBadge.background
#3E82F8 RGB(62, 130, 248) RGBA(62, 130, 248, 1) badge.background
#3E82F8 RGB(62, 130, 248) RGBA(62, 130, 248, 1) editor.background
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) editor.findMatchBackground
#F2EA01 RGB(242, 234, 1) RGBA(242, 234, 1, 1) editor.findMatchHighlightBackground
#F2EA0163 RGB(242, 234, 1) RGBA(242, 234, 1, 0.388) editor.findRangeHighlightBackground
#0000FF RGB(0, 0, 255) RGBA(0, 0, 255, 1) editor.foreground
#222222 RGB(34, 34, 34) RGBA(34, 34, 34, 1) editor.lineHighlightBackground
#94949455 RGB(148, 148, 148) RGBA(148, 148, 148, 0.333) editor.selectionBackground
#B2D6FF RGB(178, 214, 255) RGBA(178, 214, 255, 1) editor.selectionForeground
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) editorCursor.foreground
#4D4D4C RGB(77, 77, 76) RGBA(77, 77, 76, 1) editorGroupHeader.noTabsBackground
#F3F3F3 RGB(243, 243, 243) RGBA(243, 243, 243, 1) editorGroupHeader.tabsBackground
#F3F3F3 RGB(243, 243, 243) RGBA(243, 243, 243, 1) editorIndentGuide.background
#AAAAAA RGB(170, 170, 170) RGBA(170, 170, 170, 1) editorLineNumber.foreground
#808080 RGB(128, 128, 128) RGBA(128, 128, 128, 1) editorWhitespace.foreground
#F3F3F3 RGB(243, 243, 243) RGBA(243, 243, 243, 1) statusBar.background
#F3F3F3 RGB(243, 243, 243) RGBA(243, 243, 243, 1) statusBar.foreground
#5A5A5A RGB(90, 90, 90) RGBA(90, 90, 90, 1) statusBar.noFolderBackground
#F3F3F3 RGB(243, 243, 243) RGBA(243, 243, 243, 1) statusBar.noFolderForeground
#5A5A5A RGB(90, 90, 90) RGBA(90, 90, 90, 1) tab.activeBackground
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) tab.inactiveBackground
#F3F3F3 RGB(243, 243, 243) RGBA(243, 243, 243, 1) terminal.ansiBlack
#222222 RGB(34, 34, 34) RGBA(34, 34, 34, 1) terminal.ansiBrightBlack
#222222 RGB(34, 34, 34) RGBA(34, 34, 34, 1) terminal.ansiBrightRed
#C80000 RGB(200, 0, 0) RGBA(200, 0, 0, 1) terminal.ansiRed
#C80000 RGB(200, 0, 0) RGBA(200, 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
#236E26 RGB(35, 110, 38) RGBA(35, 110, 38, 1) comment.block
#236E26 RGB(35, 110, 38) RGBA(35, 110, 38, 1) comment.block.documentation
#236E26 RGB(35, 110, 38) RGBA(35, 110, 38, 1) comment.line
#236E26 RGB(35, 110, 38) RGBA(35, 110, 38, 1) constant
#AB0D8F RGB(171, 13, 143) RGBA(171, 13, 143, 1) constant.character
#AB0D8F RGB(171, 13, 143) RGBA(171, 13, 143, 1) constant.character.escape
#C61816 RGB(198, 24, 22) RGBA(198, 24, 22, 1) constant.numeric
#1B00D4 RGB(27, 0, 212) RGBA(27, 0, 212, 1) constant.numeric.integer
#1B00D4 RGB(27, 0, 212) RGBA(27, 0, 212, 1) constant.numeric.float
#1B00D4 RGB(27, 0, 212) RGBA(27, 0, 212, 1) constant.numeric.hex
#1B00D4 RGB(27, 0, 212) RGBA(27, 0, 212, 1) constant.numeric.octal
#1B00D4 RGB(27, 0, 212) RGBA(27, 0, 212, 1) constant.other
#AB0D8F RGB(171, 13, 143) RGBA(171, 13, 143, 1) constant.other.placeholder
#AB0D8F RGB(171, 13, 143) RGBA(171, 13, 143, 1) constant.regexp
#AB0D8F RGB(171, 13, 143) RGBA(171, 13, 143, 1) constant.rgb-value
#AB0D8F RGB(171, 13, 143) RGBA(171, 13, 143, 1) entity
#994500 RGB(153, 69, 0) RGBA(153, 69, 0, 1) entity.name
#3134B1 RGB(49, 52, 177) RGBA(49, 52, 177, 1) entity.name.class
#D75F00 RGB(215, 95, 0) RGBA(215, 95, 0, 1) entity.name.function
#222222 RGB(34, 34, 34) RGBA(34, 34, 34, 1) entity.name.section
#005F87 RGB(0, 95, 135) RGBA(0, 95, 135, 1) entity.name.tag
#222222 RGB(34, 34, 34) RGBA(34, 34, 34, 1) entity.name.type
#3134B1 RGB(49, 52, 177) RGBA(49, 52, 177, 1) entity.other
#994500 RGB(153, 69, 0) RGBA(153, 69, 0, 1) entity.other.attribute-name
#994500 RGB(153, 69, 0) RGBA(153, 69, 0, 1) entity.other.inherited-class
#222222 RGB(34, 34, 34) RGBA(34, 34, 34, 1) invalid
#07909A RGB(7, 144, 154) RGBA(7, 144, 154, 1) invalid.deprecated
#F3F3F3 RGB(243, 243, 243) RGBA(243, 243, 243, 1) invalid.illegal
#F3F3F3 RGB(243, 243, 243) RGBA(243, 243, 243, 1) keyword
#AC1391 RGB(172, 19, 145) RGBA(172, 19, 145, 1) keyword.control
#AC1391 RGB(172, 19, 145) RGBA(172, 19, 145, 1) keyword.control.flow
#AC1391 RGB(172, 19, 145) RGBA(172, 19, 145, 1) keyword.operator
#994500 RGB(153, 69, 0) RGBA(153, 69, 0, 1) keyword.operator.new
#AC1391 RGB(172, 19, 145) RGBA(172, 19, 145, 1) keyword.operator.assignment
#994500 RGB(153, 69, 0) RGBA(153, 69, 0, 1) keyword.operator.arithmetic
#994500 RGB(153, 69, 0) RGBA(153, 69, 0, 1) keyword.operator.logical
#994500 RGB(153, 69, 0) RGBA(153, 69, 0, 1) keyword.other
#AC1391 RGB(172, 19, 145) RGBA(172, 19, 145, 1) markup
#F7B83D RGB(247, 184, 61) RGBA(247, 184, 61, 1) markup.bold
#D75F00 RGB(215, 95, 0) RGBA(215, 95, 0, 1) markup.changed
#D7005F RGB(215, 0, 95) RGBA(215, 0, 95, 1) markup.deleted
#8959A8 RGB(137, 89, 168) RGBA(137, 89, 168, 1) markup.heading
#D70087 RGB(215, 0, 135) RGBA(215, 0, 135, 1) markup.inserted
#718C00 RGB(113, 140, 0) RGBA(113, 140, 0, 1) markup.italic
#D7005F RGB(215, 0, 95) RGBA(215, 0, 95, 1) markup.list
#8959A8 RGB(137, 89, 168) RGBA(137, 89, 168, 1) markup.list.numbered
#8959A8 RGB(137, 89, 168) RGBA(137, 89, 168, 1) markup.list.unnumbered
#8959A8 RGB(137, 89, 168) RGBA(137, 89, 168, 1) markup.quote
#D75F00 RGB(215, 95, 0) RGBA(215, 95, 0, 1) markup.raw
#718C00 RGB(113, 140, 0) RGBA(113, 140, 0, 1) meta
#C80000 RGB(200, 0, 0) RGBA(200, 0, 0, 1) meta.class
#262626 RGB(38, 38, 38) RGBA(38, 38, 38, 1) meta.selector
#D7005F RGB(215, 0, 95) RGBA(215, 0, 95, 1) meta.tag
#C0C0C0 RGB(192, 192, 192) RGBA(192, 192, 192, 1) punctuation.definition.comment
#236E26 RGB(35, 110, 38) RGBA(35, 110, 38, 1) punctuation.definition.string.begin
#4D4D4C RGB(77, 77, 76) RGBA(77, 77, 76, 1) punctuation.definition.string.end
#4D4D4C RGB(77, 77, 76) RGBA(77, 77, 76, 1) punctuation.separator
#222222 RGB(34, 34, 34) RGBA(34, 34, 34, 1) storage
#AC1391 RGB(172, 19, 145) RGBA(172, 19, 145, 1) storage.modifier
#AC1391 RGB(172, 19, 145) RGBA(172, 19, 145, 1) storage.type
#AC1391 RGB(172, 19, 145) RGBA(172, 19, 145, 1) string
#C61816 RGB(198, 24, 22) RGBA(198, 24, 22, 1) string.interpolated
#C61816 RGB(198, 24, 22) RGBA(198, 24, 22, 1) string.other
#C61816 RGB(198, 24, 22) RGBA(198, 24, 22, 1) string.quoted
#C61816 RGB(198, 24, 22) RGBA(198, 24, 22, 1) string.quoted.double
#C61816 RGB(198, 24, 22) RGBA(198, 24, 22, 1) string.quoted.other
#C61816 RGB(198, 24, 22) RGBA(198, 24, 22, 1) string.quoted.single
#C61816 RGB(198, 24, 22) RGBA(198, 24, 22, 1) string.quoted.triple
#C61816 RGB(198, 24, 22) RGBA(198, 24, 22, 1) string.regexp
#3E999F RGB(62, 153, 159) RGBA(62, 153, 159, 1) string.template
#C61816 RGB(198, 24, 22) RGBA(198, 24, 22, 1) string.unquoted
#C61816 RGB(198, 24, 22) RGBA(198, 24, 22, 1) support
#871280 RGB(135, 18, 128) RGBA(135, 18, 128, 1) support.class
#222222 RGB(34, 34, 34) RGBA(34, 34, 34, 1) support.constant
#07909A RGB(7, 144, 154) RGBA(7, 144, 154, 1) support.function
#222222 RGB(34, 34, 34) RGBA(34, 34, 34, 1) support.type
#C80000 RGB(200, 0, 0) RGBA(200, 0, 0, 1) support.type.property-name
#C80000 RGB(200, 0, 0) RGBA(200, 0, 0, 1) variable
#3134B1 RGB(49, 52, 177) RGBA(49, 52, 177, 1) variable.function
#3134B1 RGB(49, 52, 177) RGBA(49, 52, 177, 1) variable.language
#3134B1 RGB(49, 52, 177) RGBA(49, 52, 177, 1) variable.name
#3134B1 RGB(49, 52, 177) RGBA(49, 52, 177, 1) variable.other
#3134B1 RGB(49, 52, 177) RGBA(49, 52, 177, 1) variable.other.constant
#3134B1 RGB(49, 52, 177) RGBA(49, 52, 177, 1) variable.other.property
#222222 RGB(34, 34, 34) RGBA(34, 34, 34, 1) variable.other.readwrite
#3134B1 RGB(49, 52, 177) RGBA(49, 52, 177, 1) variable.parameter
#3134B1 RGB(49, 52, 177) RGBA(49, 52, 177, 1)