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
Detox
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA editor.background
#1A1A1A RGB(26, 26, 26) RGBA(26, 26, 26, 1) editor.foreground
#CCCCCC RGB(204, 204, 204) RGBA(204, 204, 204, 1) editor.lineHighlightBackground
#3E3D32 RGB(62, 61, 50) RGBA(62, 61, 50, 1) editor.selectionBackground
#666666 RGB(102, 102, 102) RGBA(102, 102, 102, 1) editorCursor.foreground
#F8F8F0 RGB(248, 248, 240) RGBA(248, 248, 240, 1) editorWhitespace.foreground
#333333 RGB(51, 51, 51) RGBA(51, 51, 51, 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
#666666 RGB(102, 102, 102) RGBA(102, 102, 102, 1) comment.block
#666666 RGB(102, 102, 102) RGBA(102, 102, 102, 1) comment.block.documentation
#666666 RGB(102, 102, 102) RGBA(102, 102, 102, 1) comment.line
#666666 RGB(102, 102, 102) RGBA(102, 102, 102, 1) constant
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) constant.character
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) constant.character.escape
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) constant.numeric
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) constant.numeric.integer
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) constant.numeric.float
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) constant.numeric.hex
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) constant.numeric.octal
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) constant.other
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) constant.other.placeholder
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) constant.regexp
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) constant.rgb-value
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) entity
#CCC4AD RGB(204, 196, 173) RGBA(204, 196, 173, 1) entity.name
#CCC4AD RGB(204, 196, 173) RGBA(204, 196, 173, 1) entity.name.function
#CCB67A RGB(204, 182, 122) RGBA(204, 182, 122, 1) entity.name.tag
#9792D3 RGB(151, 146, 211) RGBA(151, 146, 211, 1) entity.name.type
#CC817A RGB(204, 129, 122) RGBA(204, 129, 122, 1) entity.name.type.enum
#CCB0AD RGB(204, 176, 173) RGBA(204, 176, 173, 1) entity.name.type.interface
#CCC4AD RGB(204, 196, 173) RGBA(204, 196, 173, 1) entity.name.type.struct
#D392B9 RGB(211, 146, 185) RGBA(211, 146, 185, 1) entity.other
#D392B9 RGB(211, 146, 185) RGBA(211, 146, 185, 1) entity.other.attribute-name
#92D3C4 RGB(146, 211, 196) RGBA(146, 211, 196, 1) invalid
#CCAA47 RGB(204, 170, 71) RGBA(204, 170, 71, 1) invalid.deprecated
#CCAA47 RGB(204, 170, 71) RGBA(204, 170, 71, 1) invalid.illegal
#CC5247 RGB(204, 82, 71) RGBA(204, 82, 71, 1) keyword
#9792D3 RGB(151, 146, 211) RGBA(151, 146, 211, 1) keyword.control
#9792D3 RGB(151, 146, 211) RGBA(151, 146, 211, 1) keyword.control.flow
#9792D3 RGB(151, 146, 211) RGBA(151, 146, 211, 1) keyword.operator
#C492D3 RGB(196, 146, 211) RGBA(196, 146, 211, 1) keyword.operator.new
#C492D3 RGB(196, 146, 211) RGBA(196, 146, 211, 1) keyword.operator.assignment
#C492D3 RGB(196, 146, 211) RGBA(196, 146, 211, 1) keyword.operator.arithmetic
#C492D3 RGB(196, 146, 211) RGBA(196, 146, 211, 1) keyword.operator.logical
#C492D3 RGB(196, 146, 211) RGBA(196, 146, 211, 1) keyword.other
#9792D3 RGB(151, 146, 211) RGBA(151, 146, 211, 1) punctuation.definition.bracket
#C492D3 RGB(196, 146, 211) RGBA(196, 146, 211, 1) punctuation.definition.comment
#666666 RGB(102, 102, 102) RGBA(102, 102, 102, 1) punctuation.definition.string.begin
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) punctuation.definition.string.end
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) punctuation.separator
#C492D3 RGB(196, 146, 211) RGBA(196, 146, 211, 1) punctuation.separator.continuation
#C492D3 RGB(196, 146, 211) RGBA(196, 146, 211, 1) punctuation.terminator
#C492D3 RGB(196, 146, 211) RGBA(196, 146, 211, 1) storage
#9792D3 RGB(151, 146, 211) RGBA(151, 146, 211, 1) storage.modifier
#9792D3 RGB(151, 146, 211) RGBA(151, 146, 211, 1) storage.type
#9792D3 RGB(151, 146, 211) RGBA(151, 146, 211, 1) string
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) string.interpolated
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) string.other
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) string.quoted
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) string.quoted.double
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) string.quoted.other
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) string.quoted.single
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) string.quoted.triple
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) string.regexp
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) string.template
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) string.unquoted
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) support
#D39792 RGB(211, 151, 146) RGBA(211, 151, 146, 1) support.class
#D39792 RGB(211, 151, 146) RGBA(211, 151, 146, 1) support.constant
#92B9D3 RGB(146, 185, 211) RGBA(146, 185, 211, 1) support.function
#CCB67A RGB(204, 182, 122) RGBA(204, 182, 122, 1) support.type
#92D3C4 RGB(146, 211, 196) RGBA(146, 211, 196, 1) support.type.property-name
#92D3C4 RGB(146, 211, 196) RGBA(146, 211, 196, 1) variable
#ADCCC4 RGB(173, 204, 196) RGBA(173, 204, 196, 1) variable.function
#ADCCC4 RGB(173, 204, 196) RGBA(173, 204, 196, 1) variable.language
#9792D3 RGB(151, 146, 211) RGBA(151, 146, 211, 1) variable.name
#ADCCC4 RGB(173, 204, 196) RGBA(173, 204, 196, 1) variable.other
#ADCCC4 RGB(173, 204, 196) RGBA(173, 204, 196, 1) variable.other.constant
#ADCCC4 RGB(173, 204, 196) RGBA(173, 204, 196, 1) variable.other.property
#ADCCC4 RGB(173, 204, 196) RGBA(173, 204, 196, 1) variable.other.readwrite
#7ACCB7 RGB(122, 204, 183) RGBA(122, 204, 183, 1) variable.parameter
#92D3C4 RGB(146, 211, 196) RGBA(146, 211, 196, 1)