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
phppoint
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA editor.background
#EEF1F1 RGB(238, 241, 241) RGBA(238, 241, 241, 1) editor.foreground
#1D1C1C RGB(29, 28, 28) RGBA(29, 28, 28, 1) editor.inactiveSelectionBackground
#B2C4C57D RGB(178, 196, 197) RGBA(178, 196, 197, 0.49) editor.lineHighlightBackground
#F8E6AFD2 RGB(248, 230, 175) RGBA(248, 230, 175, 0.824) editor.selectionBackground
#F4B87D6C RGB(244, 184, 125) RGBA(244, 184, 125, 0.424) editorCursor.foreground
#1670D6 RGB(22, 112, 214) RGBA(22, 112, 214, 1) list.activeSelectionIconForeground
#04CDDF RGB(4, 205, 223) RGBA(4, 205, 223, 1) sideBar.background
#E8F2F5 RGB(232, 242, 245) RGBA(232, 242, 245, 1) sideBar.border
#9AB2B4 RGB(154, 178, 180) RGBA(154, 178, 180, 1) sideBar.foreground
#03636A RGB(3, 99, 106) RGBA(3, 99, 106, 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
#1C8422F6 RGB(28, 132, 34) RGBA(28, 132, 34, 0.965) comment.block
#1C8422F6 RGB(28, 132, 34) RGBA(28, 132, 34, 0.965) comment.block.documentation
#448C27 RGB(68, 140, 39) RGBA(68, 140, 39, 1) comment.line
#1C8422F6 RGB(28, 132, 34) RGBA(28, 132, 34, 0.965) constant
#096F91 RGB(9, 111, 145) RGBA(9, 111, 145, 1) constant.character
#096F91 RGB(9, 111, 145) RGBA(9, 111, 145, 1) constant.character.escape
#AD2572 RGB(173, 37, 114) RGBA(173, 37, 114, 1) constant.numeric
#096F91 RGB(9, 111, 145) RGBA(9, 111, 145, 1) constant.numeric.integer
#096F91 RGB(9, 111, 145) RGBA(9, 111, 145, 1) constant.numeric.float
#096F91 RGB(9, 111, 145) RGBA(9, 111, 145, 1) constant.numeric.hex
#096F91 RGB(9, 111, 145) RGBA(9, 111, 145, 1) constant.numeric.octal
#096F91 RGB(9, 111, 145) RGBA(9, 111, 145, 1) constant.other
#448C27 RGB(68, 140, 39) RGBA(68, 140, 39, 1) constant.other.placeholder
#448C27 RGB(68, 140, 39) RGBA(68, 140, 39, 1) constant.regexp
#096F91 RGB(9, 111, 145) RGBA(9, 111, 145, 1) constant.rgb-value
#096F91 RGB(9, 111, 145) RGBA(9, 111, 145, 1) entity
#0E5FA1 RGB(14, 95, 161) RGBA(14, 95, 161, 1) entity.name
#0E5FA1 RGB(14, 95, 161) RGBA(14, 95, 161, 1) entity.name.class
#0E5FA1 RGB(14, 95, 161) RGBA(14, 95, 161, 1) entity.name.function
#A2470A RGB(162, 71, 10) RGBA(162, 71, 10, 1) entity.name.method
#0E5FA1 RGB(14, 95, 161) RGBA(14, 95, 161, 1) entity.name.namespace
#0E5FA1 RGB(14, 95, 161) RGBA(14, 95, 161, 1) entity.name.section
#0E5FA1 RGB(14, 95, 161) RGBA(14, 95, 161, 1) entity.name.selector
#0E5FA1 RGB(14, 95, 161) RGBA(14, 95, 161, 1) entity.name.tag
#D65418 RGB(214, 84, 24) RGBA(214, 84, 24, 1) entity.name.type
#056E2F RGB(5, 110, 47) RGBA(5, 110, 47, 1) entity.name.type.enum
#056E2F RGB(5, 110, 47) RGBA(5, 110, 47, 1) entity.name.type.interface
#056E2F RGB(5, 110, 47) RGBA(5, 110, 47, 1) entity.name.type.struct
#056E2F RGB(5, 110, 47) RGBA(5, 110, 47, 1) entity.other
#0E5FA1 RGB(14, 95, 161) RGBA(14, 95, 161, 1) entity.other.attribute-name
#068C95 RGB(6, 140, 149) RGBA(6, 140, 149, 1) entity.other.inherited-class
#056E2F RGB(5, 110, 47) RGBA(5, 110, 47, 1) invalid
#F73232 RGB(247, 50, 50) RGBA(247, 50, 50, 1) invalid.illegal
#F73232 RGB(247, 50, 50) RGBA(247, 50, 50, 1) keyword
#F07F34 RGB(240, 127, 52) RGBA(240, 127, 52, 1) keyword.control
#F07F34 RGB(240, 127, 52) RGBA(240, 127, 52, 1) keyword.control.flow
#F07F34 RGB(240, 127, 52) RGBA(240, 127, 52, 1) keyword.operator
#0864A5 RGB(8, 100, 165) RGBA(8, 100, 165, 1) keyword.operator.new
#0864A5 RGB(8, 100, 165) RGBA(8, 100, 165, 1) keyword.operator.assignment
#0864A5 RGB(8, 100, 165) RGBA(8, 100, 165, 1) keyword.operator.arithmetic
#0864A5 RGB(8, 100, 165) RGBA(8, 100, 165, 1) keyword.operator.logical
#0864A5 RGB(8, 100, 165) RGBA(8, 100, 165, 1) keyword.other
#F07F34 RGB(240, 127, 52) RGBA(240, 127, 52, 1) markup
#AB6526 RGB(171, 101, 38) RGBA(171, 101, 38, 1) markup.bold
#448C27 RGB(68, 140, 39) RGBA(68, 140, 39, 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
#AA3731 RGB(170, 55, 49) RGBA(170, 55, 49, 1) markup.inline.raw
#AB6526 RGB(171, 101, 38) RGBA(171, 101, 38, 1) markup.inserted
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) markup.italic
#448C27 RGB(68, 140, 39) RGBA(68, 140, 39, 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
#7A3E9D RGB(122, 62, 157) RGBA(122, 62, 157, 1) markup.raw
#777777 RGB(119, 119, 119) RGBA(119, 119, 119, 1) meta
#434343 RGB(67, 67, 67) RGBA(67, 67, 67, 1) meta.selector
#0E5FA1 RGB(14, 95, 161) RGBA(14, 95, 161, 1) meta.tag
#9E061C RGB(158, 6, 28) RGBA(158, 6, 28, 1) punctuation.definition.bracket
#0E5FA1 RGB(14, 95, 161) RGBA(14, 95, 161, 1) punctuation.definition.comment
#1C8422F6 RGB(28, 132, 34) RGBA(28, 132, 34, 0.965) punctuation.definition.string.begin
#0E5FA1 RGB(14, 95, 161) RGBA(14, 95, 161, 1) punctuation.definition.string.end
#0E5FA1 RGB(14, 95, 161) RGBA(14, 95, 161, 1) punctuation.separator
#0E5FA1 RGB(14, 95, 161) RGBA(14, 95, 161, 1) punctuation.separator.continuation
#0E5FA1 RGB(14, 95, 161) RGBA(14, 95, 161, 1) punctuation.terminator
#0E5FA1 RGB(14, 95, 161) RGBA(14, 95, 161, 1) storage
#F07F34 RGB(240, 127, 52) RGBA(240, 127, 52, 1) storage.modifier
#F07F34 RGB(240, 127, 52) RGBA(240, 127, 52, 1) storage.type
#C60673 RGB(198, 6, 115) RGBA(198, 6, 115, 1) string
#EA8D31 RGB(234, 141, 49) RGBA(234, 141, 49, 1) string.interpolated
#EA8D31 RGB(234, 141, 49) RGBA(234, 141, 49, 1) string.other
#EA8D31 RGB(234, 141, 49) RGBA(234, 141, 49, 1) string.quoted
#EA8D31 RGB(234, 141, 49) RGBA(234, 141, 49, 1) string.quoted.double
#EA8D31 RGB(234, 141, 49) RGBA(234, 141, 49, 1) string.quoted.other
#EA8D31 RGB(234, 141, 49) RGBA(234, 141, 49, 1) string.quoted.single
#EA8D31 RGB(234, 141, 49) RGBA(234, 141, 49, 1) string.quoted.triple
#EA8D31 RGB(234, 141, 49) RGBA(234, 141, 49, 1) string.regexp
#4BCD69 RGB(75, 205, 105) RGBA(75, 205, 105, 1) string.template
#EA8D31 RGB(234, 141, 49) RGBA(234, 141, 49, 1) string.unquoted
#EA8D31 RGB(234, 141, 49) RGBA(234, 141, 49, 1) support
#448C27 RGB(68, 140, 39) RGBA(68, 140, 39, 1) support.class
#056E2F RGB(5, 110, 47) RGBA(5, 110, 47, 1) support.constant
#E05A06 RGB(224, 90, 6) RGBA(224, 90, 6, 1) support.function
#A2470A RGB(162, 71, 10) RGBA(162, 71, 10, 1) support.type
#C60673 RGB(198, 6, 115) RGBA(198, 6, 115, 1) support.type.primitive
#C60673 RGB(198, 6, 115) RGBA(198, 6, 115, 1) support.type.property-name
#0E5C8D RGB(14, 92, 141) RGBA(14, 92, 141, 1) support.variable
#CD4915 RGB(205, 73, 21) RGBA(205, 73, 21, 1) variable
#CD4915 RGB(205, 73, 21) RGBA(205, 73, 21, 1) variable.function
#CD4915 RGB(205, 73, 21) RGBA(205, 73, 21, 1) variable.language
#E05A06 RGB(224, 90, 6) RGBA(224, 90, 6, 1) variable.name
#CD4915 RGB(205, 73, 21) RGBA(205, 73, 21, 1) variable.other
#CD4915 RGB(205, 73, 21) RGBA(205, 73, 21, 1) variable.other.constant
#CD4915 RGB(205, 73, 21) RGBA(205, 73, 21, 1) variable.other.property
#CD4915 RGB(205, 73, 21) RGBA(205, 73, 21, 1) variable.other.readwrite
#CD4915 RGB(205, 73, 21) RGBA(205, 73, 21, 1) variable.parameter
#CD4915 RGB(205, 73, 21) RGBA(205, 73, 21, 1)