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
Nocturne birds 1
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA activityBarBadge.background
#ADCC00 RGB(173, 204, 0) RGBA(173, 204, 0, 1) editor.background
#263238 RGB(38, 50, 56) RGBA(38, 50, 56, 1) editor.foreground
#F3F29A RGB(243, 242, 154) RGBA(243, 242, 154, 1) sideBarTitle.foreground
#D3E488 RGB(211, 228, 136) RGBA(211, 228, 136, 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
#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
#6CA7AF RGB(108, 167, 175) RGBA(108, 167, 175, 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
#EEFFFF RGB(238, 255, 255) RGBA(238, 255, 255, 1) entity
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) entity.name
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) entity.name.class
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) entity.name.function
#FF82C1 RGB(255, 130, 193) RGBA(255, 130, 193, 1) entity.name.method
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) entity.name.namespace
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) entity.name.section
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) entity.name.selector
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) entity.name.tag
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) entity.name.type
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) entity.name.type.enum
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) entity.name.type.interface
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) entity.name.type.struct
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) entity.other
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) entity.other.attribute-name
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) entity.other.inherited-class
#EBD82E RGB(235, 216, 46) RGBA(235, 216, 46, 1) invalid
#6453FF RGB(100, 83, 255) RGBA(100, 83, 255, 1) invalid.deprecated
#6453FF RGB(100, 83, 255) RGBA(100, 83, 255, 1) invalid.illegal
#6453FF RGB(100, 83, 255) RGBA(100, 83, 255, 1) keyword
#F0A7F0 RGB(240, 167, 240) RGBA(240, 167, 240, 1) keyword.control
#FF82C1 RGB(255, 130, 193) RGBA(255, 130, 193, 1) keyword.control.flow
#FF82C1 RGB(255, 130, 193) RGBA(255, 130, 193, 1) keyword.operator
#F0A7F0 RGB(240, 167, 240) RGBA(240, 167, 240, 1) keyword.operator.new
#F0A7F0 RGB(240, 167, 240) RGBA(240, 167, 240, 1) keyword.operator.assignment
#F0A7F0 RGB(240, 167, 240) RGBA(240, 167, 240, 1) keyword.operator.arithmetic
#F0A7F0 RGB(240, 167, 240) RGBA(240, 167, 240, 1) keyword.operator.logical
#F0A7F0 RGB(240, 167, 240) RGBA(240, 167, 240, 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
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) markup.changed
#F0A7F0 RGB(240, 167, 240) RGBA(240, 167, 240, 1) markup.deleted
#6453FF RGB(100, 83, 255) RGBA(100, 83, 255, 1) markup.heading
#EBD82E RGB(235, 216, 46) RGBA(235, 216, 46, 1) markup.inline.raw
#F0A7F0 RGB(240, 167, 240) RGBA(240, 167, 240, 1) markup.inserted
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) markup.italic
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 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
#F0EBBC RGB(240, 235, 188) RGBA(240, 235, 188, 1) meta.function-call
#FF82C1 RGB(255, 130, 193) RGBA(255, 130, 193, 1) meta.tag
#6CA7AF RGB(108, 167, 175) RGBA(108, 167, 175, 1) punctuation.definition.bracket
#6CA7AF RGB(108, 167, 175) RGBA(108, 167, 175, 1) punctuation.definition.comment
#546E7A RGB(84, 110, 122) RGBA(84, 110, 122, 1) punctuation.definition.string.begin
#6CA7AF RGB(108, 167, 175) RGBA(108, 167, 175, 1) punctuation.definition.string.end
#6CA7AF RGB(108, 167, 175) RGBA(108, 167, 175, 1) punctuation.separator
#6CA7AF RGB(108, 167, 175) RGBA(108, 167, 175, 1) punctuation.separator.continuation
#6CA7AF RGB(108, 167, 175) RGBA(108, 167, 175, 1) punctuation.terminator
#6CA7AF RGB(108, 167, 175) RGBA(108, 167, 175, 1) storage
#F0A7F0 RGB(240, 167, 240) RGBA(240, 167, 240, 1) storage.modifier
#F0A7F0 RGB(240, 167, 240) RGBA(240, 167, 240, 1) storage.type
#F0A7F0 RGB(240, 167, 240) RGBA(240, 167, 240, 1) string
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) string.interpolated
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) string.other
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) string.quoted
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) string.quoted.double
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) string.quoted.other
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) string.quoted.single
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) string.quoted.triple
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) string.regexp
#6CA7AF RGB(108, 167, 175) RGBA(108, 167, 175, 1) string.template
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) string.unquoted
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) support
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) support.class
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) support.constant
#F78C6C RGB(247, 140, 108) RGBA(247, 140, 108, 1) support.function
#FF82C1 RGB(255, 130, 193) RGBA(255, 130, 193, 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) variable
#EEFFFF RGB(238, 255, 255) RGBA(238, 255, 255, 1) variable.function
#FF82C1 RGB(255, 130, 193) RGBA(255, 130, 193, 1) variable.language
#6453FF RGB(100, 83, 255) RGBA(100, 83, 255, 1) variable.name
#EEFFFF RGB(238, 255, 255) RGBA(238, 255, 255, 1) variable.other
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) variable.other.constant
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) variable.other.property
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) variable.other.readwrite
#2EEB9C RGB(46, 235, 156) RGBA(46, 235, 156, 1) variable.parameter
#F78C6C RGB(247, 140, 108) RGBA(247, 140, 108, 1)