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
Bharti Theme
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA activityBar.background
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) activityBar.foreground
#2A9D8F RGB(42, 157, 143) RGBA(42, 157, 143, 1) activityBarBadge.background
#FFCC66 RGB(255, 204, 102) RGBA(255, 204, 102, 1) activityBarBadge.foreground
#1D2433 RGB(29, 36, 51) RGBA(29, 36, 51, 1) badge.background
#ECB365 RGB(236, 179, 101) RGBA(236, 179, 101, 1) badge.foreground
#FF0101 RGB(255, 1, 1) RGBA(255, 1, 1, 1) button.background
#02B7FF RGB(2, 183, 255) RGBA(2, 183, 255, 1) button.foreground
#171C28 RGB(23, 28, 40) RGBA(23, 28, 40, 1) button.hoverBackground
#FC7A01 RGB(252, 122, 1) RGBA(252, 122, 1, 1) dropdown.background
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) dropdown.border
#00EEFF RGB(0, 238, 255) RGBA(0, 238, 255, 1) dropdown.foreground
#00EEFF RGB(0, 238, 255) RGBA(0, 238, 255, 1) dropdown.listBackground
#0D0727 RGB(13, 7, 39) RGBA(13, 7, 39, 1) editor.background
#0A192F RGB(10, 25, 47) RGBA(10, 25, 47, 1) editor.findMatchHighlightBackground
#5C0099 RGB(92, 0, 153) RGBA(92, 0, 153, 1) editor.foreground
#64FF9F RGB(100, 255, 159) RGBA(100, 255, 159, 1) editorCursor.foreground
#00EEFF RGB(0, 238, 255) RGBA(0, 238, 255, 1) editorError.foreground
#EF6B73 RGB(239, 107, 115) RGBA(239, 107, 115, 1) editorGroup.border
#F4ACB7 RGB(244, 172, 183) RGBA(244, 172, 183, 1) editorGroup.dropBackground
#0CB8E84D RGB(12, 184, 232) RGBA(12, 184, 232, 0.302) editorGroupHeader.tabsBackground
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) editorHint.foreground
#F4A261 RGB(244, 162, 97) RGBA(244, 162, 97, 1) editorInfo.foreground
#5CCFE6 RGB(92, 207, 230) RGBA(92, 207, 230, 1) editorLineNumber.foreground
#2A9D8F RGB(42, 157, 143) RGBA(42, 157, 143, 1) editorWarning.foreground
#FFD580 RGB(255, 213, 128) RGBA(255, 213, 128, 1) input.background
#050505 RGB(5, 5, 5) RGBA(5, 5, 5, 1) input.border
#02B7FF RGB(2, 183, 255) RGBA(2, 183, 255, 1) input.foreground
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) menu.background
#22223B RGB(34, 34, 59) RGBA(34, 34, 59, 1) menu.border
#00EEFF RGB(0, 238, 255) RGBA(0, 238, 255, 1) menu.foreground
#00EEFF RGB(0, 238, 255) RGBA(0, 238, 255, 1) menubar.selectionForeground
#00EEFF RGB(0, 238, 255) RGBA(0, 238, 255, 1) panel.background
#15141D RGB(21, 20, 29) RGBA(21, 20, 29, 1) panel.border
#2A9D8F RGB(42, 157, 143) RGBA(42, 157, 143, 1) panelTitle.activeForeground
#00EEFF RGB(0, 238, 255) RGBA(0, 238, 255, 1) panelTitle.inactiveForeground
#2A9D8F RGB(42, 157, 143) RGBA(42, 157, 143, 1) sideBar.background
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) sideBar.foreground
#2A9D8F RGB(42, 157, 143) RGBA(42, 157, 143, 1) sideBarTitle.foreground
#2A9D8F RGB(42, 157, 143) RGBA(42, 157, 143, 1) statusBar.background
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) statusBar.foreground
#2A9D8F RGB(42, 157, 143) RGBA(42, 157, 143, 1) tab.activeBackground
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) tab.activeBorderTop
#2A9D8F RGB(42, 157, 143) RGBA(42, 157, 143, 1) tab.activeForeground
#2A9D8F RGB(42, 157, 143) RGBA(42, 157, 143, 1) tab.hoverBackground
#00000000 RGB(0, 0, 0) RGBA(0, 0, 0, 0) tab.inactiveBackground
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) terminal.background
#0A192F RGB(10, 25, 47) RGBA(10, 25, 47, 1) terminal.foreground
#335C67 RGB(51, 92, 103) RGBA(51, 92, 103, 1) titleBar.activeBackground
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) titleBar.activeForeground
#2A9D8F RGB(42, 157, 143) RGBA(42, 157, 143, 1) window.activeBorder
#00EEFF RGB(0, 238, 255) RGBA(0, 238, 255, 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
#335C67 RGB(51, 92, 103) RGBA(51, 92, 103, 1) comment.block
#335C67 RGB(51, 92, 103) RGBA(51, 92, 103, 1) comment.block.documentation
#335C67 RGB(51, 92, 103) RGBA(51, 92, 103, 1) comment.line
#335C67 RGB(51, 92, 103) RGBA(51, 92, 103, 1) constant
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) constant.character
#F78C6C RGB(247, 140, 108) RGBA(247, 140, 108, 1) constant.character.escape
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) constant.numeric
#F78C6C RGB(247, 140, 108) RGBA(247, 140, 108, 1) constant.numeric.integer
#F78C6C RGB(247, 140, 108) RGBA(247, 140, 108, 1) constant.numeric.float
#F78C6C RGB(247, 140, 108) RGBA(247, 140, 108, 1) constant.numeric.hex
#F78C6C RGB(247, 140, 108) RGBA(247, 140, 108, 1) constant.numeric.octal
#F78C6C RGB(247, 140, 108) RGBA(247, 140, 108, 1) constant.other
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) constant.other.placeholder
#F7F7F7 RGB(247, 247, 247) RGBA(247, 247, 247, 1) entity
#C3E88D RGB(195, 232, 141) RGBA(195, 232, 141, 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
#6C99FA RGB(108, 153, 250) RGBA(108, 153, 250, 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
#B33F62 RGB(179, 63, 98) RGBA(179, 63, 98, 1) entity.name.type
#C3E88D RGB(195, 232, 141) RGBA(195, 232, 141, 1) entity.name.type.enum
#C3E88D RGB(195, 232, 141) RGBA(195, 232, 141, 1) entity.name.type.interface
#C3E88D RGB(195, 232, 141) RGBA(195, 232, 141, 1) entity.name.type.struct
#C3E88D RGB(195, 232, 141) RGBA(195, 232, 141, 1) entity.other
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) entity.other.attribute-name
#0B1014 RGB(11, 16, 20) RGBA(11, 16, 20, 1) entity.other.inherited-class
#B2CCD6 RGB(178, 204, 214) RGBA(178, 204, 214, 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
#C56969 RGB(197, 105, 105) RGBA(197, 105, 105, 1) keyword.control
#82AAFF RGB(130, 170, 255) RGBA(130, 170, 255, 1) keyword.control.flow
#82AAFF RGB(130, 170, 255) RGBA(130, 170, 255, 1) keyword.operator
#FFAE57 RGB(255, 174, 87) RGBA(255, 174, 87, 1) keyword.operator.new
#FFAE57 RGB(255, 174, 87) RGBA(255, 174, 87, 1) keyword.operator.assignment
#FFAE57 RGB(255, 174, 87) RGBA(255, 174, 87, 1) keyword.operator.arithmetic
#FFAE57 RGB(255, 174, 87) RGBA(255, 174, 87, 1) keyword.operator.logical
#FFAE57 RGB(255, 174, 87) RGBA(255, 174, 87, 1) keyword.other
#F78C6C RGB(247, 140, 108) RGBA(247, 140, 108, 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
#C3E88D RGB(195, 232, 141) RGBA(195, 232, 141, 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
#65737E RGB(101, 115, 126) RGBA(101, 115, 126, 1) meta.function
#FFAE57 RGB(255, 174, 87) RGBA(255, 174, 87, 1) meta.function-call
#6C99FA RGB(108, 153, 250) RGBA(108, 153, 250, 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
#335C67 RGB(51, 92, 103) RGBA(51, 92, 103, 1) punctuation.definition.string.begin
#C3E88D RGB(195, 232, 141) RGBA(195, 232, 141, 1) punctuation.definition.string.end
#C3E88D RGB(195, 232, 141) RGBA(195, 232, 141, 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
#C3E88D RGB(195, 232, 141) RGBA(195, 232, 141, 1) storage.modifier
#C56969 RGB(197, 105, 105) RGBA(197, 105, 105, 1) storage.type
#C56969 RGB(197, 105, 105) RGBA(197, 105, 105, 1) string
#F07178 RGB(240, 113, 120) RGBA(240, 113, 120, 1) string.interpolated
#F07178 RGB(240, 113, 120) RGBA(240, 113, 120, 1) string.other
#F07178 RGB(240, 113, 120) RGBA(240, 113, 120, 1) string.quoted
#F07178 RGB(240, 113, 120) RGBA(240, 113, 120, 1) string.quoted.double
#F07178 RGB(240, 113, 120) RGBA(240, 113, 120, 1) string.quoted.other
#F07178 RGB(240, 113, 120) RGBA(240, 113, 120, 1) string.quoted.single
#F07178 RGB(240, 113, 120) RGBA(240, 113, 120, 1) string.quoted.triple
#F07178 RGB(240, 113, 120) RGBA(240, 113, 120, 1) string.regexp
#FFEE00 RGB(255, 238, 0) RGBA(255, 238, 0, 1) string.template
#F07178 RGB(240, 113, 120) RGBA(240, 113, 120, 1) string.unquoted
#F07178 RGB(240, 113, 120) RGBA(240, 113, 120, 1) support
#99FF00 RGB(153, 255, 0) RGBA(153, 255, 0, 1) support.class
#B2CCD6 RGB(178, 204, 214) RGBA(178, 204, 214, 1) support.constant
#F78C6C RGB(247, 140, 108) RGBA(247, 140, 108, 1) support.function
#6C99FA RGB(108, 153, 250) RGBA(108, 153, 250, 1) support.other
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 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) support.variable
#B2CCD6 RGB(178, 204, 214) RGBA(178, 204, 214, 1) variable
#F7F7F7 RGB(247, 247, 247) RGBA(247, 247, 247, 1) variable.function
#6C99FA RGB(108, 153, 250) RGBA(108, 153, 250, 1) variable.language
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) variable.name
#F7F7F7 RGB(247, 247, 247) RGBA(247, 247, 247, 1) variable.other
#F07178 RGB(240, 113, 120) RGBA(240, 113, 120, 1) variable.other.constant
#F07178 RGB(240, 113, 120) RGBA(240, 113, 120, 1) variable.other.property
#F07178 RGB(240, 113, 120) RGBA(240, 113, 120, 1) variable.other.readwrite
#B2CCD6 RGB(178, 204, 214) RGBA(178, 204, 214, 1) variable.parameter
#F78C6C RGB(247, 140, 108) RGBA(247, 140, 108, 1)