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
my-dark-theme
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA activityBarBadge.background
#007ACC RGB(0, 122, 204) RGBA(0, 122, 204, 1) editor.background
#0A0A0A RGB(10, 10, 10) RGBA(10, 10, 10, 1) editor.foreground
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) sideBarTitle.foreground
#BBBBBB RGB(187, 187, 187) RGBA(187, 187, 187, 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
#546E7A RGB(84, 110, 122) RGBA(84, 110, 122, 1) comment.block
#546E7A RGB(84, 110, 122) RGBA(84, 110, 122, 1) comment.block.documentation
#546E7A RGB(84, 110, 122) RGBA(84, 110, 122, 1) comment.line
#546E7A RGB(84, 110, 122) RGBA(84, 110, 122, 1) constant
#FFAE00 RGB(255, 174, 0) RGBA(255, 174, 0, 1) constant.character
#EB8D11 RGB(235, 141, 17) RGBA(235, 141, 17, 1) constant.character.escape
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) constant.numeric
#FFAE00 RGB(255, 174, 0) RGBA(255, 174, 0, 1) constant.numeric.integer
#FFAE00 RGB(255, 174, 0) RGBA(255, 174, 0, 1) constant.numeric.float
#FFAE00 RGB(255, 174, 0) RGBA(255, 174, 0, 1) constant.numeric.hex
#FFAE00 RGB(255, 174, 0) RGBA(255, 174, 0, 1) constant.numeric.octal
#FFAE00 RGB(255, 174, 0) RGBA(255, 174, 0, 1) constant.other
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) constant.other.placeholder
#EC544E RGB(236, 84, 78) RGBA(236, 84, 78, 1) entity
#FFC400 RGB(255, 196, 0) RGBA(255, 196, 0, 1) entity.name
#C3E88D RGB(195, 232, 141) RGBA(195, 232, 141, 1) entity.name.class
#C3E88D RGB(195, 232, 141) RGBA(195, 232, 141, 1) entity.name.function
#FFC400 RGB(255, 196, 0) RGBA(255, 196, 0, 1) entity.name.method
#C3E88D RGB(195, 232, 141) RGBA(195, 232, 141, 1) entity.name.namespace
#C3E88D RGB(195, 232, 141) RGBA(195, 232, 141, 1) entity.name.section
#C3E88D RGB(195, 232, 141) RGBA(195, 232, 141, 1) entity.name.selector
#C3E88D RGB(195, 232, 141) RGBA(195, 232, 141, 1) entity.name.tag
#F85E65 RGB(248, 94, 101) RGBA(248, 94, 101, 1) entity.name.type
#E9B014 RGB(233, 176, 20) RGBA(233, 176, 20, 1) entity.name.type.enum
#E9B014 RGB(233, 176, 20) RGBA(233, 176, 20, 1) entity.name.type.interface
#E9B014 RGB(233, 176, 20) RGBA(233, 176, 20, 1) entity.name.type.struct
#E9B014 RGB(233, 176, 20) RGBA(233, 176, 20, 1) entity.other
#00CCFF RGB(0, 204, 255) RGBA(0, 204, 255, 1) entity.other.attribute-name
#FBFF00 RGB(251, 255, 0) RGBA(251, 255, 0, 1) entity.other.inherited-class
#2BEE4C RGB(43, 238, 76) RGBA(43, 238, 76, 1) invalid
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) invalid.deprecated
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) invalid.illegal
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) keyword
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) keyword.control
#B268F7 RGB(178, 104, 247) RGBA(178, 104, 247, 1) keyword.control.flow
#B268F7 RGB(178, 104, 247) RGBA(178, 104, 247, 1) keyword.operator
#DC7EF3 RGB(220, 126, 243) RGBA(220, 126, 243, 1) keyword.operator.new
#DC7EF3 RGB(220, 126, 243) RGBA(220, 126, 243, 1) keyword.operator.assignment
#FBFF00 RGB(251, 255, 0) RGBA(251, 255, 0, 1) keyword.operator.arithmetic
#DC7EF3 RGB(220, 126, 243) RGBA(220, 126, 243, 1) keyword.operator.logical
#DC7EF3 RGB(220, 126, 243) RGBA(220, 126, 243, 1) keyword.other
#EB8D11 RGB(235, 141, 17) RGBA(235, 141, 17, 1) markup
#EEFFFF RGB(238, 255, 255) RGBA(238, 255, 255, 1) markup.bold
#F07178 RGB(240, 113, 120) RGBA(240, 113, 120, 1) markup.changed
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) markup.deleted
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) markup.heading
#2BEE4C RGB(43, 238, 76) RGBA(43, 238, 76, 1) markup.inline.raw
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) markup.inserted
#C3E88D RGB(195, 232, 141) RGBA(195, 232, 141, 1) markup.italic
#F07178 RGB(240, 113, 120) RGBA(240, 113, 120, 1) markup.raw
#EEFFFF RGB(238, 255, 255) RGBA(238, 255, 255, 1) markup.underline
#F78C6C RGB(247, 140, 108) RGBA(247, 140, 108, 1) markup.underline.link
#F78C6C RGB(247, 140, 108) RGBA(247, 140, 108, 1) meta
#FFEE00 RGB(255, 238, 0) RGBA(255, 238, 0, 1) meta.function-call
#2C6DF8 RGB(44, 109, 248) RGBA(44, 109, 248, 1) meta.tag
#F85E65 RGB(248, 94, 101) RGBA(248, 94, 101, 1) punctuation.definition.comment
#546E7A RGB(84, 110, 122) RGBA(84, 110, 122, 1) storage
#DC7EF3 RGB(220, 126, 243) RGBA(220, 126, 243, 1) storage.modifier
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) storage.type
#DC7EF3 RGB(220, 126, 243) RGBA(220, 126, 243, 1) string
#2BEE4C RGB(43, 238, 76) RGBA(43, 238, 76, 1) string.interpolated
#2BEE4C RGB(43, 238, 76) RGBA(43, 238, 76, 1) string.other
#2BEE4C RGB(43, 238, 76) RGBA(43, 238, 76, 1) string.quoted
#2BEE4C RGB(43, 238, 76) RGBA(43, 238, 76, 1) string.quoted.double
#2BEE4C RGB(43, 238, 76) RGBA(43, 238, 76, 1) string.quoted.other
#2BEE4C RGB(43, 238, 76) RGBA(43, 238, 76, 1) string.quoted.single
#2BEE4C RGB(43, 238, 76) RGBA(43, 238, 76, 1) string.quoted.triple
#2BEE4C RGB(43, 238, 76) RGBA(43, 238, 76, 1) string.regexp
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) string.template
#39FF5A RGB(57, 255, 90) RGBA(57, 255, 90, 1) string.unquoted
#2BEE4C RGB(43, 238, 76) RGBA(43, 238, 76, 1) support
#FF2600 RGB(255, 38, 0) RGBA(255, 38, 0, 1) support.class
#F85E65 RGB(248, 94, 101) RGBA(248, 94, 101, 1) support.constant
#FF2600 RGB(255, 38, 0) RGBA(255, 38, 0, 1) support.function
#2C6DF8 RGB(44, 109, 248) RGBA(44, 109, 248, 1) support.other
#F07178 RGB(240, 113, 120) RGBA(240, 113, 120, 1) support.type
#B2CCD6 RGB(178, 204, 214) RGBA(178, 204, 214, 1) support.type.primitive
#FFEE00 RGB(255, 238, 0) RGBA(255, 238, 0, 1) support.type.property-name
#3CFF00 RGB(60, 255, 0) RGBA(60, 255, 0, 1) variable
#00FF22 RGB(0, 255, 34) RGBA(0, 255, 34, 1) variable.function
#2C6DF8 RGB(44, 109, 248) RGBA(44, 109, 248, 1) variable.language
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) variable.name
#00FF22 RGB(0, 255, 34) RGBA(0, 255, 34, 1) variable.other
#00B7FF RGB(0, 183, 255) RGBA(0, 183, 255, 1) variable.other.constant
#00B7FF RGB(0, 183, 255) RGBA(0, 183, 255, 1) variable.other.property
#00B7FF RGB(0, 183, 255) RGBA(0, 183, 255, 1) variable.other.readwrite
#00B7FF RGB(0, 183, 255) RGBA(0, 183, 255, 1) variable.parameter
#00B7FF RGB(0, 183, 255) RGBA(0, 183, 255, 1)