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 2
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA activityBarBadge.background
#D9B26A RGB(217, 178, 106) RGBA(217, 178, 106, 1) editor.background
#010B40 RGB(1, 11, 64) RGBA(1, 11, 64, 1) editor.foreground
#F2DE79 RGB(242, 222, 121) RGBA(242, 222, 121, 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
#CB5BEC RGB(203, 91, 236) RGBA(203, 91, 236, 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
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) entity.name
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) entity.name.class
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) entity.name.function
#FF82C1 RGB(255, 130, 193) RGBA(255, 130, 193, 1) entity.name.method
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) entity.name.namespace
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) entity.name.section
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) entity.name.selector
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) entity.name.tag
#B2AB44 RGB(178, 171, 68) RGBA(178, 171, 68, 1) entity.name.type
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) entity.name.type.enum
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) entity.name.type.interface
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) entity.name.type.struct
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 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
#F2DE79 RGB(242, 222, 121) RGBA(242, 222, 121, 1) invalid
#EE3783 RGB(238, 55, 131) RGBA(238, 55, 131, 1) invalid.deprecated
#EE3783 RGB(238, 55, 131) RGBA(238, 55, 131, 1) invalid.illegal
#EE3783 RGB(238, 55, 131) RGBA(238, 55, 131, 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
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) markup.changed
#F0A7F0 RGB(240, 167, 240) RGBA(240, 167, 240, 1) markup.deleted
#EE3783 RGB(238, 55, 131) RGBA(238, 55, 131, 1) markup.heading
#F2DE79 RGB(242, 222, 121) RGBA(242, 222, 121, 1) markup.inline.raw
#F0A7F0 RGB(240, 167, 240) RGBA(240, 167, 240, 1) markup.inserted
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) markup.italic
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 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
#CB5BEC RGB(203, 91, 236) RGBA(203, 91, 236, 1) punctuation.definition.bracket
#CB5BEC RGB(203, 91, 236) RGBA(203, 91, 236, 1) punctuation.definition.comment
#546E7A RGB(84, 110, 122) RGBA(84, 110, 122, 1) punctuation.definition.string.begin
#CB5BEC RGB(203, 91, 236) RGBA(203, 91, 236, 1) punctuation.definition.string.end
#CB5BEC RGB(203, 91, 236) RGBA(203, 91, 236, 1) punctuation.separator
#CB5BEC RGB(203, 91, 236) RGBA(203, 91, 236, 1) punctuation.separator.continuation
#CB5BEC RGB(203, 91, 236) RGBA(203, 91, 236, 1) punctuation.terminator
#CB5BEC RGB(203, 91, 236) RGBA(203, 91, 236, 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
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) string.interpolated
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) string.other
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) string.quoted
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) string.quoted.double
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) string.quoted.other
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) string.quoted.single
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) string.quoted.triple
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) string.regexp
#CB5BEC RGB(203, 91, 236) RGBA(203, 91, 236, 1) string.template
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) string.unquoted
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) support
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 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
#D27CEC RGB(210, 124, 236) RGBA(210, 124, 236, 1) support.type.primitive
#D27CEC RGB(210, 124, 236) RGBA(210, 124, 236, 1) support.type.property-name
#D27CEC RGB(210, 124, 236) RGBA(210, 124, 236, 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
#EE3783 RGB(238, 55, 131) RGBA(238, 55, 131, 1) variable.name
#EEFFFF RGB(238, 255, 255) RGBA(238, 255, 255, 1) variable.other
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) variable.other.constant
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) variable.other.property
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) variable.other.readwrite
#91B544 RGB(145, 181, 68) RGBA(145, 181, 68, 1) variable.parameter
#F78C6C RGB(247, 140, 108) RGBA(247, 140, 108, 1)