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
Proca 4
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA activityBarBadge.background
#007ACC RGB(0, 122, 204) RGBA(0, 122, 204, 1) editor.background
#2A2D2E RGB(42, 45, 46) RGBA(42, 45, 46, 1) editor.foreground
#DDFFCC RGB(221, 255, 204) RGBA(221, 255, 204, 1) sideBarTitle.foreground
#FE9962 RGB(254, 153, 98) RGBA(254, 153, 98, 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
#CB898D RGB(203, 137, 141) RGBA(203, 137, 141, 1) comment.block
#CB898D RGB(203, 137, 141) RGBA(203, 137, 141, 1) comment.block.documentation
#CB898D RGB(203, 137, 141) RGBA(203, 137, 141, 1) comment.line
#CB898D RGB(203, 137, 141) RGBA(203, 137, 141, 1) constant
#9F7D73 RGB(159, 125, 115) RGBA(159, 125, 115, 1) constant.character
#FCE331 RGB(252, 227, 49) RGBA(252, 227, 49, 1) constant.character.escape
#9AC325 RGB(154, 195, 37) RGBA(154, 195, 37, 1) constant.numeric
#FCE331 RGB(252, 227, 49) RGBA(252, 227, 49, 1) constant.numeric.integer
#FCE331 RGB(252, 227, 49) RGBA(252, 227, 49, 1) constant.numeric.float
#FCE331 RGB(252, 227, 49) RGBA(252, 227, 49, 1) constant.numeric.hex
#FCE331 RGB(252, 227, 49) RGBA(252, 227, 49, 1) constant.numeric.octal
#FCE331 RGB(252, 227, 49) RGBA(252, 227, 49, 1) constant.other
#9F7D73 RGB(159, 125, 115) RGBA(159, 125, 115, 1) constant.other.placeholder
#1A69F4 RGB(26, 105, 244) RGBA(26, 105, 244, 1) entity
#CCFF34 RGB(204, 255, 52) RGBA(204, 255, 52, 1) entity.name
#CCFF34 RGB(204, 255, 52) RGBA(204, 255, 52, 1) entity.name.class
#CCFF34 RGB(204, 255, 52) RGBA(204, 255, 52, 1) entity.name.function
#F27348 RGB(242, 115, 72) RGBA(242, 115, 72, 1) entity.name.method
#CCFF34 RGB(204, 255, 52) RGBA(204, 255, 52, 1) entity.name.namespace
#CCFF34 RGB(204, 255, 52) RGBA(204, 255, 52, 1) entity.name.section
#CCFF34 RGB(204, 255, 52) RGBA(204, 255, 52, 1) entity.name.selector
#CCFF34 RGB(204, 255, 52) RGBA(204, 255, 52, 1) entity.name.tag
#D5618E RGB(213, 97, 142) RGBA(213, 97, 142, 1) entity.name.type
#CCFF34 RGB(204, 255, 52) RGBA(204, 255, 52, 1) entity.name.type.enum
#CCFF34 RGB(204, 255, 52) RGBA(204, 255, 52, 1) entity.name.type.interface
#CCFF34 RGB(204, 255, 52) RGBA(204, 255, 52, 1) entity.name.type.struct
#CCFF34 RGB(204, 255, 52) RGBA(204, 255, 52, 1) entity.other
#768899 RGB(118, 136, 153) RGBA(118, 136, 153, 1) entity.other.attribute-name
#395486 RGB(57, 84, 134) RGBA(57, 84, 134, 1) entity.other.inherited-class
#E3A855 RGB(227, 168, 85) RGBA(227, 168, 85, 1) invalid
#979BD0 RGB(151, 155, 208) RGBA(151, 155, 208, 1) invalid.deprecated
#979BD0 RGB(151, 155, 208) RGBA(151, 155, 208, 1) invalid.illegal
#979BD0 RGB(151, 155, 208) RGBA(151, 155, 208, 1) keyword
#F4EB57 RGB(244, 235, 87) RGBA(244, 235, 87, 1) keyword.control
#B0A2DB RGB(176, 162, 219) RGBA(176, 162, 219, 1) keyword.control.flow
#B0A2DB RGB(176, 162, 219) RGBA(176, 162, 219, 1) keyword.operator
#F4EB57 RGB(244, 235, 87) RGBA(244, 235, 87, 1) keyword.operator.new
#F4EB57 RGB(244, 235, 87) RGBA(244, 235, 87, 1) keyword.operator.assignment
#F4EB57 RGB(244, 235, 87) RGBA(244, 235, 87, 1) keyword.operator.arithmetic
#F4EB57 RGB(244, 235, 87) RGBA(244, 235, 87, 1) keyword.operator.logical
#F4EB57 RGB(244, 235, 87) RGBA(244, 235, 87, 1) keyword.other
#FCE331 RGB(252, 227, 49) RGBA(252, 227, 49, 1) markup
#D0E786 RGB(208, 231, 134) RGBA(208, 231, 134, 1) markup.bold
#A0C184 RGB(160, 193, 132) RGBA(160, 193, 132, 1) markup.changed
#920548 RGB(146, 5, 72) RGBA(146, 5, 72, 1) markup.deleted
#E31453 RGB(227, 20, 83) RGBA(227, 20, 83, 1) markup.heading
#E3A855 RGB(227, 168, 85) RGBA(227, 168, 85, 1) markup.inline.raw
#CB41FF RGB(203, 65, 255) RGBA(203, 65, 255, 1) markup.inserted
#627A06 RGB(98, 122, 6) RGBA(98, 122, 6, 1) markup.italic
#A0C184 RGB(160, 193, 132) RGBA(160, 193, 132, 1) markup.raw
#894357 RGB(137, 67, 87) RGBA(137, 67, 87, 1) markup.underline
#E291AB RGB(226, 145, 171) RGBA(226, 145, 171, 1) markup.underline.link
#E291AB RGB(226, 145, 171) RGBA(226, 145, 171, 1) meta
#92AB85 RGB(146, 171, 133) RGBA(146, 171, 133, 1) meta.function-call
#F27348 RGB(242, 115, 72) RGBA(242, 115, 72, 1) meta.tag
#1D7EFC RGB(29, 126, 252) RGBA(29, 126, 252, 1) punctuation.definition.bracket
#1D7EFC RGB(29, 126, 252) RGBA(29, 126, 252, 1) punctuation.definition.comment
#CB898D RGB(203, 137, 141) RGBA(203, 137, 141, 1) punctuation.definition.string.begin
#1D7EFC RGB(29, 126, 252) RGBA(29, 126, 252, 1) punctuation.definition.string.end
#1D7EFC RGB(29, 126, 252) RGBA(29, 126, 252, 1) punctuation.separator
#1D7EFC RGB(29, 126, 252) RGBA(29, 126, 252, 1) punctuation.separator.continuation
#1D7EFC RGB(29, 126, 252) RGBA(29, 126, 252, 1) punctuation.terminator
#1D7EFC RGB(29, 126, 252) RGBA(29, 126, 252, 1) storage
#F4EB57 RGB(244, 235, 87) RGBA(244, 235, 87, 1) storage.modifier
#F4EB57 RGB(244, 235, 87) RGBA(244, 235, 87, 1) storage.type
#F4EB57 RGB(244, 235, 87) RGBA(244, 235, 87, 1) string
#A0C184 RGB(160, 193, 132) RGBA(160, 193, 132, 1) string.interpolated
#A0C184 RGB(160, 193, 132) RGBA(160, 193, 132, 1) string.other
#A0C184 RGB(160, 193, 132) RGBA(160, 193, 132, 1) string.quoted
#A0C184 RGB(160, 193, 132) RGBA(160, 193, 132, 1) string.quoted.double
#A0C184 RGB(160, 193, 132) RGBA(160, 193, 132, 1) string.quoted.other
#A0C184 RGB(160, 193, 132) RGBA(160, 193, 132, 1) string.quoted.single
#A0C184 RGB(160, 193, 132) RGBA(160, 193, 132, 1) string.quoted.triple
#A0C184 RGB(160, 193, 132) RGBA(160, 193, 132, 1) string.regexp
#7DA29C RGB(125, 162, 156) RGBA(125, 162, 156, 1) string.template
#A0C184 RGB(160, 193, 132) RGBA(160, 193, 132, 1) string.unquoted
#A0C184 RGB(160, 193, 132) RGBA(160, 193, 132, 1) support
#D0A186 RGB(208, 161, 134) RGBA(208, 161, 134, 1) support.class
#DFF444 RGB(223, 244, 68) RGBA(223, 244, 68, 1) support.constant
#FCE331 RGB(252, 227, 49) RGBA(252, 227, 49, 1) support.function
#F27348 RGB(242, 115, 72) RGBA(242, 115, 72, 1) support.other
#DFF444 RGB(223, 244, 68) RGBA(223, 244, 68, 1) support.type
#02E60A RGB(2, 230, 10) RGBA(2, 230, 10, 1) support.type.primitive
#02E60A RGB(2, 230, 10) RGBA(2, 230, 10, 1) support.type.property-name
#DD3412 RGB(221, 52, 18) RGBA(221, 52, 18, 1) variable
#1A69F4 RGB(26, 105, 244) RGBA(26, 105, 244, 1) variable.function
#F27348 RGB(242, 115, 72) RGBA(242, 115, 72, 1) variable.language
#D0B7A2 RGB(208, 183, 162) RGBA(208, 183, 162, 1) variable.name
#1A69F4 RGB(26, 105, 244) RGBA(26, 105, 244, 1) variable.other
#FCC406 RGB(252, 196, 6) RGBA(252, 196, 6, 1) variable.other.constant
#FCC406 RGB(252, 196, 6) RGBA(252, 196, 6, 1) variable.other.property
#FCC406 RGB(252, 196, 6) RGBA(252, 196, 6, 1) variable.other.readwrite
#FCC406 RGB(252, 196, 6) RGBA(252, 196, 6, 1) variable.parameter
#FCE331 RGB(252, 227, 49) RGBA(252, 227, 49, 1)