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
Material Syntax - Dark
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
#5A5A5A RGB(90, 90, 90) RGBA(90, 90, 90, 1) comment.block
#5A5A5A RGB(90, 90, 90) RGBA(90, 90, 90, 1) comment.block.documentation
#5A5A5A RGB(90, 90, 90) RGBA(90, 90, 90, 1) comment.line
#5A5A5A RGB(90, 90, 90) RGBA(90, 90, 90, 1) constant
#F77669 RGB(247, 118, 105) RGBA(247, 118, 105, 1) constant.character
#F77669 RGB(247, 118, 105) RGBA(247, 118, 105, 1) constant.character.escape
#F77669 RGB(247, 118, 105) RGBA(247, 118, 105, 1) constant.numeric
#F77669 RGB(247, 118, 105) RGBA(247, 118, 105, 1) constant.numeric.integer
#F77669 RGB(247, 118, 105) RGBA(247, 118, 105, 1) constant.numeric.float
#F77669 RGB(247, 118, 105) RGBA(247, 118, 105, 1) constant.numeric.hex
#F77669 RGB(247, 118, 105) RGBA(247, 118, 105, 1) constant.numeric.octal
#F77669 RGB(247, 118, 105) RGBA(247, 118, 105, 1) constant.other
#F77669 RGB(247, 118, 105) RGBA(247, 118, 105, 1) constant.other.placeholder
#F77669 RGB(247, 118, 105) RGBA(247, 118, 105, 1) entity
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) entity.name
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) entity.name.class
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) entity.name.function
#82AAFF RGB(130, 170, 255) RGBA(130, 170, 255, 1) entity.name.tag
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) entity.other
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) entity.other.attribute-name
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) entity.other.inherited-class
#91B859 RGB(145, 184, 89) RGBA(145, 184, 89, 1) invalid
#F8F8F0 RGB(248, 248, 240) RGBA(248, 248, 240, 1) invalid.deprecated
#F8F8F0 RGB(248, 248, 240) RGBA(248, 248, 240, 1) invalid.illegal
#F8F8F0 RGB(248, 248, 240) RGBA(248, 248, 240, 1) keyword
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) keyword.control
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) keyword.control.flow
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) keyword.operator
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) keyword.operator.new
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) keyword.operator.assignment
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) keyword.operator.arithmetic
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) keyword.operator.logical
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) keyword.other
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) markup
#DDBB88 RGB(221, 187, 136) RGBA(221, 187, 136, 1) markup.bold
#F77669 RGB(247, 118, 105) RGBA(247, 118, 105, 1) markup.heading
#DDBB88 RGB(221, 187, 136) RGBA(221, 187, 136, 1) markup.inline.raw
#F1E655 RGB(241, 230, 85) RGBA(241, 230, 85, 1) markup.italic
#F77669 RGB(247, 118, 105) RGBA(247, 118, 105, 1) markup.quote
#F77669 RGB(247, 118, 105) RGBA(247, 118, 105, 1) meta
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) meta.selector
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) punctuation.definition.string.begin
#7DC9E3 RGB(125, 201, 227) RGBA(125, 201, 227, 1) punctuation.definition.string.end
#7DC9E3 RGB(125, 201, 227) RGBA(125, 201, 227, 1) storage
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) storage.modifier
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) storage.type
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) string
#91B859 RGB(145, 184, 89) RGBA(145, 184, 89, 1) string.interpolated
#91B859 RGB(145, 184, 89) RGBA(145, 184, 89, 1) string.other
#91B859 RGB(145, 184, 89) RGBA(145, 184, 89, 1) string.quoted
#B0CD89 RGB(176, 205, 137) RGBA(176, 205, 137, 1) string.quoted.double
#B0CD89 RGB(176, 205, 137) RGBA(176, 205, 137, 1) string.quoted.other
#B0CD89 RGB(176, 205, 137) RGBA(176, 205, 137, 1) string.quoted.single
#B0CD89 RGB(176, 205, 137) RGBA(176, 205, 137, 1) string.quoted.triple
#B0CD89 RGB(176, 205, 137) RGBA(176, 205, 137, 1) string.regexp
#91B859 RGB(145, 184, 89) RGBA(145, 184, 89, 1) string.template
#91B859 RGB(145, 184, 89) RGBA(145, 184, 89, 1) string.unquoted
#91B859 RGB(145, 184, 89) RGBA(145, 184, 89, 1) support
#CEF2EF RGB(206, 242, 239) RGBA(206, 242, 239, 1) support.class
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) support.constant
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) support.function
#82AAFF RGB(130, 170, 255) RGBA(130, 170, 255, 1) support.type
#FFEB95 RGB(255, 235, 149) RGBA(255, 235, 149, 1) support.type.primitive
#FFEB95 RGB(255, 235, 149) RGBA(255, 235, 149, 1) support.type.property-name
#80CBC4 RGB(128, 203, 196) RGBA(128, 203, 196, 1) variable
#B2CCD6 RGB(178, 204, 214) RGBA(178, 204, 214, 1) variable.function
#B2CCD6 RGB(178, 204, 214) RGBA(178, 204, 214, 1) variable.language
#B2CCD6 RGB(178, 204, 214) RGBA(178, 204, 214, 1) variable.name
#B2CCD6 RGB(178, 204, 214) RGBA(178, 204, 214, 1) variable.other
#B2CCD6 RGB(178, 204, 214) RGBA(178, 204, 214, 1) variable.other.constant
#B2CCD6 RGB(178, 204, 214) RGBA(178, 204, 214, 1) variable.other.property
#B2CCD6 RGB(178, 204, 214) RGBA(178, 204, 214, 1) variable.other.readwrite
#B2CCD6 RGB(178, 204, 214) RGBA(178, 204, 214, 1) variable.parameter
#B2CCD6 RGB(178, 204, 214) RGBA(178, 204, 214, 1)