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
Rocket
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA editor.background
#323232 RGB(50, 50, 50) RGBA(50, 50, 50, 1) editor.foreground
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) editor.lineHighlightBackground
#353637 RGB(53, 54, 55) RGBA(53, 54, 55, 1) editor.selectionBackground
#5A647EE0 RGB(90, 100, 126) RGBA(90, 100, 126, 0.878) editorCursor.foreground
#91FF00 RGB(145, 255, 0) RGBA(145, 255, 0, 1) editorWhitespace.foreground
#404040 RGB(64, 64, 64) RGBA(64, 64, 64, 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
#BC9458 RGB(188, 148, 88) RGBA(188, 148, 88, 1) comment.block
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) comment.block.documentation
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) comment.line
#BC9458 RGB(188, 148, 88) RGBA(188, 148, 88, 1) constant
#6C99BB RGB(108, 153, 187) RGBA(108, 153, 187, 1) constant.character
#6C99BB RGB(108, 153, 187) RGBA(108, 153, 187, 1) constant.character.escape
#787878 RGB(120, 120, 120) RGBA(120, 120, 120, 1) constant.numeric
#6C99BB RGB(108, 153, 187) RGBA(108, 153, 187, 1) constant.numeric.integer
#6C99BB RGB(108, 153, 187) RGBA(108, 153, 187, 1) constant.numeric.float
#6C99BB RGB(108, 153, 187) RGBA(108, 153, 187, 1) constant.numeric.hex
#6C99BB RGB(108, 153, 187) RGBA(108, 153, 187, 1) constant.numeric.octal
#6C99BB RGB(108, 153, 187) RGBA(108, 153, 187, 1) constant.other
#6C99BB RGB(108, 153, 187) RGBA(108, 153, 187, 1) constant.other.placeholder
#6C99BB RGB(108, 153, 187) RGBA(108, 153, 187, 1) constant.regexp
#6C99BB RGB(108, 153, 187) RGBA(108, 153, 187, 1) constant.rgb-value
#6C99BB RGB(108, 153, 187) RGBA(108, 153, 187, 1) entity
#FFF980 RGB(255, 249, 128) RGBA(255, 249, 128, 1) entity.name
#FFF980 RGB(255, 249, 128) RGBA(255, 249, 128, 1) entity.name.class
#FFF980 RGB(255, 249, 128) RGBA(255, 249, 128, 1) entity.name.function
#FFF980 RGB(255, 249, 128) RGBA(255, 249, 128, 1) entity.name.method
#FFF980 RGB(255, 249, 128) RGBA(255, 249, 128, 1) entity.name.namespace
#FFF980 RGB(255, 249, 128) RGBA(255, 249, 128, 1) entity.name.section
#FFF980 RGB(255, 249, 128) RGBA(255, 249, 128, 1) entity.name.selector
#FFF980 RGB(255, 249, 128) RGBA(255, 249, 128, 1) entity.name.tag
#FFF980 RGB(255, 249, 128) RGBA(255, 249, 128, 1) entity.name.type
#FFF980 RGB(255, 249, 128) RGBA(255, 249, 128, 1) entity.name.type.enum
#FFF980 RGB(255, 249, 128) RGBA(255, 249, 128, 1) entity.name.type.interface
#FFF980 RGB(255, 249, 128) RGBA(255, 249, 128, 1) entity.name.type.struct
#FFF980 RGB(255, 249, 128) RGBA(255, 249, 128, 1) invalid
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) invalid.deprecated
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) invalid.illegal
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) keyword
#A86F3F RGB(168, 111, 63) RGBA(168, 111, 63, 1) keyword.control
#A86F3F RGB(168, 111, 63) RGBA(168, 111, 63, 1) keyword.control.flow
#A86F3F RGB(168, 111, 63) RGBA(168, 111, 63, 1) keyword.operator
#A86F3F RGB(168, 111, 63) RGBA(168, 111, 63, 1) keyword.operator.new
#A86F3F RGB(168, 111, 63) RGBA(168, 111, 63, 1) keyword.operator.assignment
#A86F3F RGB(168, 111, 63) RGBA(168, 111, 63, 1) keyword.operator.arithmetic
#A86F3F RGB(168, 111, 63) RGBA(168, 111, 63, 1) keyword.operator.logical
#A86F3F RGB(168, 111, 63) RGBA(168, 111, 63, 1) keyword.other
#A86F3F RGB(168, 111, 63) RGBA(168, 111, 63, 1) markup
#C2C2C2 RGB(194, 194, 194) RGBA(194, 194, 194, 1) markup.bold
#C2C2C2 RGB(194, 194, 194) RGBA(194, 194, 194, 1) markup.list
#6EA533 RGB(110, 165, 51) RGBA(110, 165, 51, 1) markup.list.numbered
#6EA533 RGB(110, 165, 51) RGBA(110, 165, 51, 1) markup.list.unnumbered
#6EA533 RGB(110, 165, 51) RGBA(110, 165, 51, 1) meta
#FFE5BB RGB(255, 229, 187) RGBA(255, 229, 187, 1) meta.tag
#FFE5BB RGB(255, 229, 187) RGBA(255, 229, 187, 1) storage
#A86F3F RGB(168, 111, 63) RGBA(168, 111, 63, 1) storage.modifier
#A86F3F RGB(168, 111, 63) RGBA(168, 111, 63, 1) storage.type
#A86F3F RGB(168, 111, 63) RGBA(168, 111, 63, 1) string
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.interpolated
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) string.other
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.quoted
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.quoted.double
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.quoted.other
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.quoted.single
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.quoted.triple
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.regexp
#CCCC33 RGB(204, 204, 51) RGBA(204, 204, 51, 1) string.template
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.unquoted
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) support
#B83426 RGB(184, 52, 38) RGBA(184, 52, 38, 1) support.class
#CCCC33 RGB(204, 204, 51) RGBA(204, 204, 51, 1) support.constant
#6C99BB RGB(108, 153, 187) RGBA(108, 153, 187, 1) support.function
#B83426 RGB(184, 52, 38) RGBA(184, 52, 38, 1) variable
#B7DFF8 RGB(183, 223, 248) RGBA(183, 223, 248, 1) variable.other
#B7DFF8 RGB(183, 223, 248) RGBA(183, 223, 248, 1) variable.other.constant
#B7DFF8 RGB(183, 223, 248) RGBA(183, 223, 248, 1) variable.other.property
#B7DFF8 RGB(183, 223, 248) RGBA(183, 223, 248, 1) variable.other.readwrite
#B7DFF8 RGB(183, 223, 248) RGBA(183, 223, 248, 1)