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
Magie Pluvieuse
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA editor.background
#D0D7D8 RGB(208, 215, 216) RGBA(208, 215, 216, 1) editor.foreground
#79747A RGB(121, 116, 122) RGBA(121, 116, 122, 1) list.activeSelectionIconForeground
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) tab.activeBackground
#B2BDBD RGB(178, 189, 189) RGBA(178, 189, 189, 1) tab.activeForeground
#4A494B RGB(74, 73, 75) RGBA(74, 73, 75, 1) tab.inactiveBackground
#D1D3CE RGB(209, 211, 206) RGBA(209, 211, 206, 1) tab.inactiveForeground
#2E3622 RGB(46, 54, 34) RGBA(46, 54, 34, 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
#848299 RGB(132, 130, 153) RGBA(132, 130, 153, 1) comment.block
#848299 RGB(132, 130, 153) RGBA(132, 130, 153, 1) comment.block.documentation
#848299 RGB(132, 130, 153) RGBA(132, 130, 153, 1) comment.line
#848299 RGB(132, 130, 153) RGBA(132, 130, 153, 1) constant
#3A8D53 RGB(58, 141, 83) RGBA(58, 141, 83, 1) constant.character
#3A8D53 RGB(58, 141, 83) RGBA(58, 141, 83, 1) constant.character.escape
#4F3C96 RGB(79, 60, 150) RGBA(79, 60, 150, 1) constant.numeric
#3A8D53 RGB(58, 141, 83) RGBA(58, 141, 83, 1) constant.numeric.integer
#3A8D53 RGB(58, 141, 83) RGBA(58, 141, 83, 1) constant.numeric.float
#3A8D53 RGB(58, 141, 83) RGBA(58, 141, 83, 1) constant.numeric.hex
#3A8D53 RGB(58, 141, 83) RGBA(58, 141, 83, 1) constant.numeric.octal
#3A8D53 RGB(58, 141, 83) RGBA(58, 141, 83, 1) constant.other
#3A8D53 RGB(58, 141, 83) RGBA(58, 141, 83, 1) constant.other.placeholder
#3A8D53 RGB(58, 141, 83) RGBA(58, 141, 83, 1) constant.regexp
#3A8D53 RGB(58, 141, 83) RGBA(58, 141, 83, 1) constant.rgb-value
#3A8D53 RGB(58, 141, 83) RGBA(58, 141, 83, 1) entity
#DD4545 RGB(221, 69, 69) RGBA(221, 69, 69, 1) entity.name
#DD4545 RGB(221, 69, 69) RGBA(221, 69, 69, 1) entity.name.function
#5A6372 RGB(90, 99, 114) RGBA(90, 99, 114, 1) entity.name.type
#4F8D8F RGB(79, 141, 143) RGBA(79, 141, 143, 1) entity.name.type.enum
#4F8D8F RGB(79, 141, 143) RGBA(79, 141, 143, 1) entity.name.type.interface
#4F8D8F RGB(79, 141, 143) RGBA(79, 141, 143, 1) entity.name.type.struct
#4F8D8F RGB(79, 141, 143) RGBA(79, 141, 143, 1) entity.other
#4F8D8F RGB(79, 141, 143) RGBA(79, 141, 143, 1) entity.other.inherited-class
#4F8D8F RGB(79, 141, 143) RGBA(79, 141, 143, 1) invalid
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) invalid.deprecated
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) invalid.illegal
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) keyword
#1B8375 RGB(27, 131, 117) RGBA(27, 131, 117, 1) keyword.control
#1B8375 RGB(27, 131, 117) RGBA(27, 131, 117, 1) keyword.control.flow
#1B8375 RGB(27, 131, 117) RGBA(27, 131, 117, 1) keyword.operator
#5B6669 RGB(91, 102, 105) RGBA(91, 102, 105, 1) keyword.operator.new
#5B6669 RGB(91, 102, 105) RGBA(91, 102, 105, 1) keyword.operator.assignment
#5B6669 RGB(91, 102, 105) RGBA(91, 102, 105, 1) keyword.operator.arithmetic
#5B6669 RGB(91, 102, 105) RGBA(91, 102, 105, 1) keyword.operator.logical
#5B6669 RGB(91, 102, 105) RGBA(91, 102, 105, 1) keyword.other
#1B8375 RGB(27, 131, 117) RGBA(27, 131, 117, 1) meta
#5A6372 RGB(90, 99, 114) RGBA(90, 99, 114, 1) meta.function-call
#5A6372 RGB(90, 99, 114) RGBA(90, 99, 114, 1) punctuation.definition.bracket
#5B6669 RGB(91, 102, 105) RGBA(91, 102, 105, 1) punctuation.definition.comment
#848299 RGB(132, 130, 153) RGBA(132, 130, 153, 1) punctuation.definition.string.begin
#5B6669 RGB(91, 102, 105) RGBA(91, 102, 105, 1) punctuation.definition.string.end
#5B6669 RGB(91, 102, 105) RGBA(91, 102, 105, 1) punctuation.separator
#5B6669 RGB(91, 102, 105) RGBA(91, 102, 105, 1) punctuation.separator.continuation
#5B6669 RGB(91, 102, 105) RGBA(91, 102, 105, 1) punctuation.terminator
#5B6669 RGB(91, 102, 105) RGBA(91, 102, 105, 1) storage
#1B8375 RGB(27, 131, 117) RGBA(27, 131, 117, 1) storage.modifier
#8262A7 RGB(130, 98, 167) RGBA(130, 98, 167, 1) storage.type
#8262A7 RGB(130, 98, 167) RGBA(130, 98, 167, 1) string
#679BB9 RGB(103, 155, 185) RGBA(103, 155, 185, 1) string.interpolated
#679BB9 RGB(103, 155, 185) RGBA(103, 155, 185, 1) string.other
#679BB9 RGB(103, 155, 185) RGBA(103, 155, 185, 1) string.quoted
#679BB9 RGB(103, 155, 185) RGBA(103, 155, 185, 1) string.quoted.double
#679BB9 RGB(103, 155, 185) RGBA(103, 155, 185, 1) string.quoted.other
#679BB9 RGB(103, 155, 185) RGBA(103, 155, 185, 1) string.quoted.single
#679BB9 RGB(103, 155, 185) RGBA(103, 155, 185, 1) string.quoted.triple
#679BB9 RGB(103, 155, 185) RGBA(103, 155, 185, 1) string.regexp
#509480 RGB(80, 148, 128) RGBA(80, 148, 128, 1) string.template
#679BB9 RGB(103, 155, 185) RGBA(103, 155, 185, 1) string.unquoted
#679BB9 RGB(103, 155, 185) RGBA(103, 155, 185, 1) support
#4F8D8F RGB(79, 141, 143) RGBA(79, 141, 143, 1) support.class
#4F8D8F RGB(79, 141, 143) RGBA(79, 141, 143, 1) support.constant
#927AA7 RGB(146, 122, 167) RGBA(146, 122, 167, 1) support.function
#5A6372 RGB(90, 99, 114) RGBA(90, 99, 114, 1) support.type
#4F8D8F RGB(79, 141, 143) RGBA(79, 141, 143, 1) support.type.primitive
#4F8D8F RGB(79, 141, 143) RGBA(79, 141, 143, 1) support.type.property-name
#4F8D8F RGB(79, 141, 143) RGBA(79, 141, 143, 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
#5A6372 RGB(90, 99, 114) RGBA(90, 99, 114, 1) variable.language
#927AA7 RGB(146, 122, 167) RGBA(146, 122, 167, 1) variable.name
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) variable.other
#5F8D96 RGB(95, 141, 150) RGBA(95, 141, 150, 1) variable.other.constant
#5F8D96 RGB(95, 141, 150) RGBA(95, 141, 150, 1) variable.other.property
#5F8D96 RGB(95, 141, 150) RGBA(95, 141, 150, 1) variable.other.readwrite
#5F8D96 RGB(95, 141, 150) RGBA(95, 141, 150, 1) variable.parameter
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1)