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
Microsoft Graph
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
#9683A1 RGB(150, 131, 161) RGBA(150, 131, 161, 1) comment.block
#9683A1 RGB(150, 131, 161) RGBA(150, 131, 161, 1) comment.block.documentation
#9683A1 RGB(150, 131, 161) RGBA(150, 131, 161, 1) comment.line
#9683A1 RGB(150, 131, 161) RGBA(150, 131, 161, 1) constant
#CA79D0 RGB(202, 121, 208) RGBA(202, 121, 208, 1) constant.character
#4398F0 RGB(67, 152, 240) RGBA(67, 152, 240, 1) constant.character.escape
#4398F0 RGB(67, 152, 240) RGBA(67, 152, 240, 1) constant.numeric
#CA79D0 RGB(202, 121, 208) RGBA(202, 121, 208, 1) constant.numeric.integer
#CA79D0 RGB(202, 121, 208) RGBA(202, 121, 208, 1) constant.numeric.float
#CA79D0 RGB(202, 121, 208) RGBA(202, 121, 208, 1) constant.numeric.hex
#CA79D0 RGB(202, 121, 208) RGBA(202, 121, 208, 1) constant.numeric.octal
#CA79D0 RGB(202, 121, 208) RGBA(202, 121, 208, 1) constant.other
#CA79D0 RGB(202, 121, 208) RGBA(202, 121, 208, 1) constant.other.placeholder
#CA79D0 RGB(202, 121, 208) RGBA(202, 121, 208, 1) constant.regexp
#CA79D0 RGB(202, 121, 208) RGBA(202, 121, 208, 1) constant.rgb-value
#CA79D0 RGB(202, 121, 208) RGBA(202, 121, 208, 1) entity
#9E79D0 RGB(158, 121, 208) RGBA(158, 121, 208, 1) entity.name
#9E79D0 RGB(158, 121, 208) RGBA(158, 121, 208, 1) entity.name.class
#9E79D0 RGB(158, 121, 208) RGBA(158, 121, 208, 1) entity.name.function
#9E79D0 RGB(158, 121, 208) RGBA(158, 121, 208, 1) entity.name.method
#9E79D0 RGB(158, 121, 208) RGBA(158, 121, 208, 1) entity.name.namespace
#9E79D0 RGB(158, 121, 208) RGBA(158, 121, 208, 1) entity.name.section
#CCCCCC RGB(204, 204, 204) RGBA(204, 204, 204, 1) entity.name.selector
#9E79D0 RGB(158, 121, 208) RGBA(158, 121, 208, 1) entity.name.tag
#313131 RGB(49, 49, 49) RGBA(49, 49, 49, 1) entity.name.type
#6DC2E9 RGB(109, 194, 233) RGBA(109, 194, 233, 1) entity.name.type.enum
#6DC2E9 RGB(109, 194, 233) RGBA(109, 194, 233, 1) entity.name.type.interface
#6DC2E9 RGB(109, 194, 233) RGBA(109, 194, 233, 1) entity.name.type.struct
#6DC2E9 RGB(109, 194, 233) RGBA(109, 194, 233, 1) entity.other
#9E79D0 RGB(158, 121, 208) RGBA(158, 121, 208, 1) entity.other.attribute-name
#313131 RGB(49, 49, 49) RGBA(49, 49, 49, 1) entity.other.inherited-class
#6DC2E9 RGB(109, 194, 233) RGBA(109, 194, 233, 1) invalid
#060D31 RGB(6, 13, 49) RGBA(6, 13, 49, 1) invalid.illegal
#060D31 RGB(6, 13, 49) RGBA(6, 13, 49, 1) keyword
#9E79D0 RGB(158, 121, 208) RGBA(158, 121, 208, 1) keyword.control
#9E79D0 RGB(158, 121, 208) RGBA(158, 121, 208, 1) keyword.control.flow
#9E79D0 RGB(158, 121, 208) RGBA(158, 121, 208, 1) keyword.operator
#7FD079 RGB(127, 208, 121) RGBA(127, 208, 121, 1) keyword.operator.new
#7FD079 RGB(127, 208, 121) RGBA(127, 208, 121, 1) keyword.operator.assignment
#7FD079 RGB(127, 208, 121) RGBA(127, 208, 121, 1) keyword.operator.arithmetic
#7FD079 RGB(127, 208, 121) RGBA(127, 208, 121, 1) keyword.operator.logical
#7FD079 RGB(127, 208, 121) RGBA(127, 208, 121, 1) keyword.other
#9E79D0 RGB(158, 121, 208) RGBA(158, 121, 208, 1) markup
#565656 RGB(86, 86, 86) RGBA(86, 86, 86, 1) markup.bold
#666666 RGB(102, 102, 102) RGBA(102, 102, 102, 1) markup.changed
#967EFB RGB(150, 126, 251) RGBA(150, 126, 251, 1) markup.deleted
#F92672 RGB(249, 38, 114) RGBA(249, 38, 114, 1) markup.inserted
#A6E22E RGB(166, 226, 46) RGBA(166, 226, 46, 1) markup.italic
#313131 RGB(49, 49, 49) RGBA(49, 49, 49, 1) markup.list
#6DC2E9 RGB(109, 194, 233) RGBA(109, 194, 233, 1) markup.list.numbered
#6DC2E9 RGB(109, 194, 233) RGBA(109, 194, 233, 1) markup.list.unnumbered
#6DC2E9 RGB(109, 194, 233) RGBA(109, 194, 233, 1) markup.quote
#666666 RGB(102, 102, 102) RGBA(102, 102, 102, 1) markup.raw
#808080 RGB(128, 128, 128) RGBA(128, 128, 128, 1) markup.underline
#555555 RGB(85, 85, 85) RGBA(85, 85, 85, 1) markup.underline.link
#555555 RGB(85, 85, 85) RGBA(85, 85, 85, 1) meta
#313131 RGB(49, 49, 49) RGBA(49, 49, 49, 1) meta.tag
#313131 RGB(49, 49, 49) RGBA(49, 49, 49, 1) punctuation.definition.bracket
#666666 RGB(102, 102, 102) RGBA(102, 102, 102, 1) punctuation.definition.comment
#666666 RGB(102, 102, 102) RGBA(102, 102, 102, 1) punctuation.definition.string.begin
#313131 RGB(49, 49, 49) RGBA(49, 49, 49, 1) punctuation.definition.string.end
#313131 RGB(49, 49, 49) RGBA(49, 49, 49, 1) punctuation.separator
#6E5330 RGB(110, 83, 48) RGBA(110, 83, 48, 1) punctuation.separator.continuation
#6E5330 RGB(110, 83, 48) RGBA(110, 83, 48, 1) punctuation.terminator
#6E5330 RGB(110, 83, 48) RGBA(110, 83, 48, 1) storage
#9E79D0 RGB(158, 121, 208) RGBA(158, 121, 208, 1) storage.modifier
#9E79D0 RGB(158, 121, 208) RGBA(158, 121, 208, 1) storage.type
#B6E0F4 RGB(182, 224, 244) RGBA(182, 224, 244, 1) string
#4398F0 RGB(67, 152, 240) RGBA(67, 152, 240, 1) string.interpolated
#4398F0 RGB(67, 152, 240) RGBA(67, 152, 240, 1) string.other
#4398F0 RGB(67, 152, 240) RGBA(67, 152, 240, 1) string.quoted
#926730 RGB(146, 103, 48) RGBA(146, 103, 48, 1) string.quoted.double
#926730 RGB(146, 103, 48) RGBA(146, 103, 48, 1) string.quoted.other
#926730 RGB(146, 103, 48) RGBA(146, 103, 48, 1) string.quoted.single
#926730 RGB(146, 103, 48) RGBA(146, 103, 48, 1) string.quoted.triple
#926730 RGB(146, 103, 48) RGBA(146, 103, 48, 1) string.regexp
#4398F0 RGB(67, 152, 240) RGBA(67, 152, 240, 1) string.template
#4398F0 RGB(67, 152, 240) RGBA(67, 152, 240, 1) string.unquoted
#4398F0 RGB(67, 152, 240) RGBA(67, 152, 240, 1) support
#6DC2E9 RGB(109, 194, 233) RGBA(109, 194, 233, 1) support.class
#6DC2E9 RGB(109, 194, 233) RGBA(109, 194, 233, 1) support.function
#9E79D0 RGB(158, 121, 208) RGBA(158, 121, 208, 1) support.type
#B6E0F4 RGB(182, 224, 244) RGBA(182, 224, 244, 1) support.type.primitive
#B6E0F4 RGB(182, 224, 244) RGBA(182, 224, 244, 1) support.type.property-name
#B6E0F4 RGB(182, 224, 244) RGBA(182, 224, 244, 1)