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
Transgender (Dark)
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA activityBar.background
#202020 RGB(32, 32, 32) RGBA(32, 32, 32, 1) activityBar.foreground
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) activityBarBadge.background
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) editor.background
#1E1E1E RGB(30, 30, 30) RGBA(30, 30, 30, 1) editor.foreground
#EEFFFF RGB(238, 255, 255) RGBA(238, 255, 255, 1) editorLineNumber.foreground
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) gitDecoration.modifiedResourceForeground
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) gitDecoration.untrackedResourceForeground
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) list.errorForeground
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) list.warningForeground
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) sideBarTitle.foreground
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) statusBar.background
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) statusBar.debuggingBackground
#263238 RGB(38, 50, 56) RGBA(38, 50, 56, 1) statusBar.foreground
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) statusBar.noFolderBackground
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) statusBar.noFolderForeground
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 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
#D9D8D8 RGB(217, 216, 216) RGBA(217, 216, 216, 1) comment.block
#D9D8D8 RGB(217, 216, 216) RGBA(217, 216, 216, 1) comment.block.documentation
#D9D8D8 RGB(217, 216, 216) RGBA(217, 216, 216, 1) comment.line
#D9D8D8 RGB(217, 216, 216) RGBA(217, 216, 216, 1) constant
#F7B5F1 RGB(247, 181, 241) RGBA(247, 181, 241, 1) constant.character
#FFBADE RGB(255, 186, 222) RGBA(255, 186, 222, 1) constant.character.escape
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) constant.numeric
#FFBADE RGB(255, 186, 222) RGBA(255, 186, 222, 1) constant.numeric.integer
#FFBADE RGB(255, 186, 222) RGBA(255, 186, 222, 1) constant.numeric.float
#FFBADE RGB(255, 186, 222) RGBA(255, 186, 222, 1) constant.numeric.hex
#FFBADE RGB(255, 186, 222) RGBA(255, 186, 222, 1) constant.numeric.octal
#FFBADE RGB(255, 186, 222) RGBA(255, 186, 222, 1) constant.other
#F7B5F1 RGB(247, 181, 241) RGBA(247, 181, 241, 1) constant.other.placeholder
#EEFFFF RGB(238, 255, 255) RGBA(238, 255, 255, 1) entity
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) entity.name
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) entity.name.class
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) entity.name.function
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) entity.name.method
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) entity.name.namespace
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) entity.name.section
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) entity.name.selector
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) entity.name.tag
#F595A8 RGB(245, 149, 168) RGBA(245, 149, 168, 1) entity.name.type
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) entity.name.type.enum
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) entity.name.type.interface
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) entity.name.type.struct
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) entity.other
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) entity.other.attribute-name
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) entity.other.inherited-class
#FFD7E0 RGB(255, 215, 224) RGBA(255, 215, 224, 1) invalid
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) invalid.deprecated
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) invalid.illegal
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) keyword
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) keyword.control
#99B8FC RGB(153, 184, 252) RGBA(153, 184, 252, 1) keyword.control.flow
#99B8FC RGB(153, 184, 252) RGBA(153, 184, 252, 1) keyword.operator
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) keyword.operator.new
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) keyword.operator.assignment
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) keyword.operator.arithmetic
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) keyword.operator.logical
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) keyword.other
#FFBADE RGB(255, 186, 222) RGBA(255, 186, 222, 1) markup
#EEFFFF RGB(238, 255, 255) RGBA(238, 255, 255, 1) markup.bold
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) markup.changed
#F3A2B2 RGB(243, 162, 178) RGBA(243, 162, 178, 1) markup.deleted
#F58A9F RGB(245, 138, 159) RGBA(245, 138, 159, 1) markup.heading
#FFD7E0 RGB(255, 215, 224) RGBA(255, 215, 224, 1) markup.inline.raw
#C792EA RGB(199, 146, 234) RGBA(199, 146, 234, 1) markup.inserted
#99B8FC RGB(153, 184, 252) RGBA(153, 184, 252, 1) markup.italic
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) markup.raw
#EEFFFF RGB(238, 255, 255) RGBA(238, 255, 255, 1) markup.underline
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) markup.underline.link
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) meta
#65737E RGB(101, 115, 126) RGBA(101, 115, 126, 1) meta.function-call
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) meta.tag
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) punctuation.definition.bracket
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) punctuation.definition.comment
#D9D8D8 RGB(217, 216, 216) RGBA(217, 216, 216, 1) punctuation.definition.string.begin
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) punctuation.definition.string.end
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) punctuation.separator
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) punctuation.separator.continuation
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) punctuation.terminator
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) storage
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) storage.modifier
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) storage.type
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) string
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) string.interpolated
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) string.other
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) string.quoted
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) string.quoted.double
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) string.quoted.other
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) string.quoted.single
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) string.quoted.triple
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) string.regexp
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) string.template
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) string.unquoted
#F5A7B7 RGB(245, 167, 183) RGBA(245, 167, 183, 1) support
#B0C6F5 RGB(176, 198, 245) RGBA(176, 198, 245, 1) support.class
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) support.constant
#FFBADE RGB(255, 186, 222) RGBA(255, 186, 222, 1) support.function
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) support.other
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) support.type
#B2CCD6 RGB(178, 204, 214) RGBA(178, 204, 214, 1) support.type.primitive
#B2CCD6 RGB(178, 204, 214) RGBA(178, 204, 214, 1) support.type.property-name
#B2CCD6 RGB(178, 204, 214) RGBA(178, 204, 214, 1) variable
#EEFFFF RGB(238, 255, 255) RGBA(238, 255, 255, 1) variable.function
#5BCEF8 RGB(91, 206, 248) RGBA(91, 206, 248, 1) variable.language
#82AAFF RGB(130, 170, 255) RGBA(130, 170, 255, 1) variable.name
#EEFFFF RGB(238, 255, 255) RGBA(238, 255, 255, 1) variable.other
#2FBEF1 RGB(47, 190, 241) RGBA(47, 190, 241, 1) variable.other.constant
#2FBEF1 RGB(47, 190, 241) RGBA(47, 190, 241, 1) variable.other.property
#2FBEF1 RGB(47, 190, 241) RGBA(47, 190, 241, 1) variable.other.readwrite
#2FBEF1 RGB(47, 190, 241) RGBA(47, 190, 241, 1) variable.parameter
#FFBADE RGB(255, 186, 222) RGBA(255, 186, 222, 1)