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
Dark Chrome DevTools
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
#676767 RGB(103, 103, 103) RGBA(103, 103, 103, 1) comment.block
#676767 RGB(103, 103, 103) RGBA(103, 103, 103, 1) comment.block.documentation
#676767 RGB(103, 103, 103) RGBA(103, 103, 103, 1) comment.line
#676767 RGB(103, 103, 103) RGBA(103, 103, 103, 1) constant
#9AA83A RGB(154, 168, 58) RGBA(154, 168, 58, 1) constant.character
#663399 RGB(102, 51, 153) RGBA(102, 51, 153, 1) constant.character.escape
#663399 RGB(102, 51, 153) RGBA(102, 51, 153, 1) constant.numeric
#97E7A9 RGB(151, 231, 169) RGBA(151, 231, 169, 1) constant.numeric.integer
#97E7A9 RGB(151, 231, 169) RGBA(151, 231, 169, 1) constant.numeric.float
#97E7A9 RGB(151, 231, 169) RGBA(151, 231, 169, 1) constant.numeric.hex
#97E7A9 RGB(151, 231, 169) RGBA(151, 231, 169, 1) constant.numeric.octal
#97E7A9 RGB(151, 231, 169) RGBA(151, 231, 169, 1) constant.other
#663399 RGB(102, 51, 153) RGBA(102, 51, 153, 1) constant.other.placeholder
#663399 RGB(102, 51, 153) RGBA(102, 51, 153, 1) entity
#FEA24E RGB(254, 162, 78) RGBA(254, 162, 78, 1) entity.name
#9872A2 RGB(152, 114, 162) RGBA(152, 114, 162, 1) entity.name.class
#58A4C8 RGB(88, 164, 200) RGBA(88, 164, 200, 1) entity.name.function
#C7B652 RGB(199, 182, 82) RGBA(199, 182, 82, 1) entity.name.tag
#58A4C8 RGB(88, 164, 200) RGBA(88, 164, 200, 1) entity.name.type
#58A4C8 RGB(88, 164, 200) RGBA(88, 164, 200, 1) entity.other
#FEA24E RGB(254, 162, 78) RGBA(254, 162, 78, 1) entity.other.attribute-name
#93B1CF RGB(147, 177, 207) RGBA(147, 177, 207, 1) entity.other.inherited-class
#FFFF00 RGB(255, 255, 0) RGBA(255, 255, 0, 1) invalid
#FF0B00 RGB(255, 11, 0) RGBA(255, 11, 0, 1) invalid.deprecated
#FF0B00 RGB(255, 11, 0) RGBA(255, 11, 0, 1) invalid.illegal
#FF0B00 RGB(255, 11, 0) RGBA(255, 11, 0, 1) keyword
#8D74C1 RGB(141, 116, 193) RGBA(141, 116, 193, 1) keyword.control
#58A4C8 RGB(88, 164, 200) RGBA(88, 164, 200, 1) keyword.control.flow
#58A4C8 RGB(88, 164, 200) RGBA(88, 164, 200, 1) keyword.operator
#8D74C1 RGB(141, 116, 193) RGBA(141, 116, 193, 1) keyword.operator.new
#8D74C1 RGB(141, 116, 193) RGBA(141, 116, 193, 1) keyword.operator.assignment
#8D74C1 RGB(141, 116, 193) RGBA(141, 116, 193, 1) keyword.operator.arithmetic
#8D74C1 RGB(141, 116, 193) RGBA(141, 116, 193, 1) keyword.operator.logical
#8D74C1 RGB(141, 116, 193) RGBA(141, 116, 193, 1) keyword.other
#8D74C1 RGB(141, 116, 193) RGBA(141, 116, 193, 1) markup
#D0B344 RGB(208, 179, 68) RGBA(208, 179, 68, 1) markup.bold
#6089B4 RGB(96, 137, 180) RGBA(96, 137, 180, 1) markup.heading
#D0B344 RGB(208, 179, 68) RGBA(208, 179, 68, 1) markup.inline.raw
#FF0080 RGB(255, 0, 128) RGBA(255, 0, 128, 1) markup.italic
#6089B4 RGB(96, 137, 180) RGBA(96, 137, 180, 1) markup.list
#9AA83A RGB(154, 168, 58) RGBA(154, 168, 58, 1) markup.list.numbered
#9AA83A RGB(154, 168, 58) RGBA(154, 168, 58, 1) markup.list.unnumbered
#9AA83A RGB(154, 168, 58) RGBA(154, 168, 58, 1) markup.quote
#9872A2 RGB(152, 114, 162) RGBA(152, 114, 162, 1) meta
#D0B344 RGB(208, 179, 68) RGBA(208, 179, 68, 1) meta.function-call
#0080FF RGB(0, 128, 255) RGBA(0, 128, 255, 1) meta.tag
#D0B344 RGB(208, 179, 68) RGBA(208, 179, 68, 1) punctuation.definition.string.begin
#93B1CF RGB(147, 177, 207) RGBA(147, 177, 207, 1) punctuation.definition.string.end
#93B1CF RGB(147, 177, 207) RGBA(147, 177, 207, 1) punctuation.separator
#58A4C8 RGB(88, 164, 200) RGBA(88, 164, 200, 1) storage
#8D74C1 RGB(141, 116, 193) RGBA(141, 116, 193, 1) storage.modifier
#8D74C1 RGB(141, 116, 193) RGBA(141, 116, 193, 1) storage.type
#8D74C1 RGB(141, 116, 193) RGBA(141, 116, 193, 1) string
#FF9257 RGB(255, 146, 87) RGBA(255, 146, 87, 1) string.interpolated
#FF9257 RGB(255, 146, 87) RGBA(255, 146, 87, 1) string.other
#FF9257 RGB(255, 146, 87) RGBA(255, 146, 87, 1) string.quoted
#FF9257 RGB(255, 146, 87) RGBA(255, 146, 87, 1) string.quoted.double
#FF9257 RGB(255, 146, 87) RGBA(255, 146, 87, 1) string.quoted.other
#FF9257 RGB(255, 146, 87) RGBA(255, 146, 87, 1) string.quoted.single
#FF9257 RGB(255, 146, 87) RGBA(255, 146, 87, 1) string.quoted.triple
#FF9257 RGB(255, 146, 87) RGBA(255, 146, 87, 1) string.regexp
#FF9257 RGB(255, 146, 87) RGBA(255, 146, 87, 1) string.template
#FF9257 RGB(255, 146, 87) RGBA(255, 146, 87, 1) string.unquoted
#FF9257 RGB(255, 146, 87) RGBA(255, 146, 87, 1) support
#EAEAEA RGB(234, 234, 234) RGBA(234, 234, 234, 1) support.class
#EAEAEA RGB(234, 234, 234) RGBA(234, 234, 234, 1) support.constant
#EAEAEA RGB(234, 234, 234) RGBA(234, 234, 234, 1) support.function
#9872A2 RGB(152, 114, 162) RGBA(152, 114, 162, 1) support.other
#EAEAEA RGB(234, 234, 234) RGBA(234, 234, 234, 1) support.type
#EAEAEA RGB(234, 234, 234) RGBA(234, 234, 234, 1) support.type.primitive
#EAEAEA RGB(234, 234, 234) RGBA(234, 234, 234, 1) support.type.property-name
#EAEAEA RGB(234, 234, 234) RGBA(234, 234, 234, 1) support.variable
#EAEAEA RGB(234, 234, 234) RGBA(234, 234, 234, 1) variable
#D0B344 RGB(208, 179, 68) RGBA(208, 179, 68, 1) variable.language
#D0B344 RGB(208, 179, 68) RGBA(208, 179, 68, 1) variable.other
#58A4C8 RGB(88, 164, 200) RGBA(88, 164, 200, 1) variable.other.constant
#58A4C8 RGB(88, 164, 200) RGBA(88, 164, 200, 1) variable.other.property
#FFFF00 RGB(255, 255, 0) RGBA(255, 255, 0, 1) variable.other.readwrite
#58A4C8 RGB(88, 164, 200) RGBA(88, 164, 200, 1) variable.parameter
#58A4C8 RGB(88, 164, 200) RGBA(88, 164, 200, 1)