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
OS X Flat Dark
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA activityBar.background
#5D5F60 RGB(93, 95, 96) RGBA(93, 95, 96, 1) activityBar.foreground
#BBBBBB RGB(187, 187, 187) RGBA(187, 187, 187, 1) activityBarBadge.background
#007ACC RGB(0, 122, 204) RGBA(0, 122, 204, 1) editor.background
#1F1F21 RGB(31, 31, 33) RGBA(31, 31, 33, 1) editor.foreground
#F7F7F7 RGB(247, 247, 247) RGBA(247, 247, 247, 1) editor.inactiveSelectionBackground
#838383 RGB(131, 131, 131) RGBA(131, 131, 131, 1) editor.selectionBackground
#BBBBBB RGB(187, 187, 187) RGBA(187, 187, 187, 1) editor.wordHighlightBackground
#BBBBBB RGB(187, 187, 187) RGBA(187, 187, 187, 1) editor.wordHighlightStrongBackground
#BBBBBB RGB(187, 187, 187) RGBA(187, 187, 187, 1) editorCursor.foreground
#F7F7F7 RGB(247, 247, 247) RGBA(247, 247, 247, 1) editorGroupHeader.noTabsBackground
#3C3F41 RGB(60, 63, 65) RGBA(60, 63, 65, 1) editorGroupHeader.tabsBackground
#3C3F41 RGB(60, 63, 65) RGBA(60, 63, 65, 1) editorLineNumber.foreground
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) editorWhitespace.foreground
#BBBBBB RGB(187, 187, 187) RGBA(187, 187, 187, 1) focusBorder
#3F4043 RGB(63, 64, 67) RGBA(63, 64, 67, 1) input.background
#1F1F21 RGB(31, 31, 33) RGBA(31, 31, 33, 1) input.foreground
#F7F7F7 RGB(247, 247, 247) RGBA(247, 247, 247, 1) list.activeSelectionBackground
#2D2E30 RGB(45, 46, 48) RGBA(45, 46, 48, 1) list.activeSelectionForeground
#5AC8FA RGB(90, 200, 250) RGBA(90, 200, 250, 1) list.hoverBackground
#3C3F41 RGB(60, 63, 65) RGBA(60, 63, 65, 1) list.hoverForeground
#5AC8FA RGB(90, 200, 250) RGBA(90, 200, 250, 1) list.inactiveSelectionBackground
#3C3F41 RGB(60, 63, 65) RGBA(60, 63, 65, 1) list.inactiveSelectionForeground
#999999 RGB(153, 153, 153) RGBA(153, 153, 153, 1) scrollbar.shadow
#838383 RGB(131, 131, 131) RGBA(131, 131, 131, 1) scrollbarSlider.activeBackground
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) scrollbarSlider.background
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) scrollbarSlider.hoverBackground
#000000 RGB(0, 0, 0) RGBA(0, 0, 0, 1) sideBar.background
#3F4043 RGB(63, 64, 67) RGBA(63, 64, 67, 1) sideBar.foreground
#F7F7F7 RGB(247, 247, 247) RGBA(247, 247, 247, 1) sideBarSectionHeader.background
#F7F7F711 RGB(247, 247, 247) RGBA(247, 247, 247, 0.067) sideBarSectionHeader.foreground
#F7F7F7 RGB(247, 247, 247) RGBA(247, 247, 247, 1) sideBarTitle.foreground
#F7F7F7 RGB(247, 247, 247) RGBA(247, 247, 247, 1) statusBar.background
#1F1F21 RGB(31, 31, 33) RGBA(31, 31, 33, 1) statusBar.border
#F7F7F711 RGB(247, 247, 247) RGBA(247, 247, 247, 0.067) statusBar.foreground
#F7F7F7 RGB(247, 247, 247) RGBA(247, 247, 247, 1) statusBar.noFolderBackground
#1F1F21 RGB(31, 31, 33) RGBA(31, 31, 33, 1) statusBar.noFolderForeground
#007ACC RGB(0, 122, 204) RGBA(0, 122, 204, 1) tab.activeBackground
#1F1F21 RGB(31, 31, 33) RGBA(31, 31, 33, 1) tab.activeForeground
#F7F7F7 RGB(247, 247, 247) RGBA(247, 247, 247, 1) tab.inactiveBackground
#1F1F217A RGB(31, 31, 33) RGBA(31, 31, 33, 0.478) tab.inactiveForeground
#F7F7F77A RGB(247, 247, 247) RGBA(247, 247, 247, 0.478)
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
#8E8E93 RGB(142, 142, 147) RGBA(142, 142, 147, 1) comment.block
#8E8E93 RGB(142, 142, 147) RGBA(142, 142, 147, 1) comment.block.documentation
#8E8E93 RGB(142, 142, 147) RGBA(142, 142, 147, 1) comment.line
#8E8E93 RGB(142, 142, 147) RGBA(142, 142, 147, 1) constant
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) constant.character
#FF5E3A RGB(255, 94, 58) RGBA(255, 94, 58, 1) constant.character.escape
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) constant.numeric
#FF5E3A RGB(255, 94, 58) RGBA(255, 94, 58, 1) constant.numeric.integer
#FF5E3A RGB(255, 94, 58) RGBA(255, 94, 58, 1) constant.numeric.float
#FF5E3A RGB(255, 94, 58) RGBA(255, 94, 58, 1) constant.numeric.hex
#FF5E3A RGB(255, 94, 58) RGBA(255, 94, 58, 1) constant.numeric.octal
#FF5E3A RGB(255, 94, 58) RGBA(255, 94, 58, 1) constant.other
#FFDB4C RGB(255, 219, 76) RGBA(255, 219, 76, 1) constant.other.placeholder
#4CD964 RGB(76, 217, 100) RGBA(76, 217, 100, 1) entity
#82AAFF RGB(130, 170, 255) RGBA(130, 170, 255, 1) entity.name
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) entity.name.class
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) entity.name.function
#82AAFF RGB(130, 170, 255) RGBA(130, 170, 255, 1) entity.name.method
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) entity.name.namespace
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) entity.name.section
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) entity.name.selector
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) entity.name.tag
#5AC8FA RGB(90, 200, 250) RGBA(90, 200, 250, 1) entity.name.type
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) entity.name.type.enum
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) entity.name.type.interface
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) entity.name.type.struct
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) entity.other
#82AAFF RGB(130, 170, 255) RGBA(130, 170, 255, 1) entity.other.attribute-name
#FF5E3A RGB(255, 94, 58) RGBA(255, 94, 58, 1) entity.other.inherited-class
#FFDB4C RGB(255, 219, 76) RGBA(255, 219, 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
#5AC8FA RGB(90, 200, 250) RGBA(90, 200, 250, 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
#5AC8FA RGB(90, 200, 250) RGBA(90, 200, 250, 1) keyword.operator.new
#5AC8FA RGB(90, 200, 250) RGBA(90, 200, 250, 1) keyword.operator.assignment
#5AC8FA RGB(90, 200, 250) RGBA(90, 200, 250, 1) keyword.operator.arithmetic
#5AC8FA RGB(90, 200, 250) RGBA(90, 200, 250, 1) keyword.operator.logical
#5AC8FA RGB(90, 200, 250) RGBA(90, 200, 250, 1) keyword.other
#FF5E3A RGB(255, 94, 58) RGBA(255, 94, 58, 1) markup
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) markup.changed
#FFCB6B RGB(255, 203, 107) RGBA(255, 203, 107, 1) markup.deleted
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) markup.heading
#FFDB4C RGB(255, 219, 76) RGBA(255, 219, 76, 1) markup.inserted
#C3E88D RGB(195, 232, 141) RGBA(195, 232, 141, 1) meta
#4CD964 RGB(76, 217, 100) RGBA(76, 217, 100, 1) meta.function-call
#82AAFF RGB(130, 170, 255) RGBA(130, 170, 255, 1) meta.tag
#F7F7F7 RGB(247, 247, 247) RGBA(247, 247, 247, 1) punctuation.definition.bracket
#F7F7F7 RGB(247, 247, 247) RGBA(247, 247, 247, 1) punctuation.definition.comment
#8E8E93 RGB(142, 142, 147) RGBA(142, 142, 147, 1) punctuation.definition.string.begin
#FFDB4C RGB(255, 219, 76) RGBA(255, 219, 76, 1) punctuation.definition.string.end
#FFDB4C RGB(255, 219, 76) RGBA(255, 219, 76, 1) punctuation.separator
#F7F7F7 RGB(247, 247, 247) RGBA(247, 247, 247, 1) punctuation.separator.continuation
#F7F7F7 RGB(247, 247, 247) RGBA(247, 247, 247, 1) punctuation.terminator
#F7F7F7 RGB(247, 247, 247) RGBA(247, 247, 247, 1) storage
#5AC8FA RGB(90, 200, 250) RGBA(90, 200, 250, 1) storage.modifier
#5AC8FA RGB(90, 200, 250) RGBA(90, 200, 250, 1) storage.type
#5AC8FA RGB(90, 200, 250) RGBA(90, 200, 250, 1) string
#FFDB4C RGB(255, 219, 76) RGBA(255, 219, 76, 1) string.interpolated
#FFDB4C RGB(255, 219, 76) RGBA(255, 219, 76, 1) string.other
#FFDB4C RGB(255, 219, 76) RGBA(255, 219, 76, 1) string.quoted
#FFDB4C RGB(255, 219, 76) RGBA(255, 219, 76, 1) string.quoted.double
#FFDB4C RGB(255, 219, 76) RGBA(255, 219, 76, 1) string.quoted.other
#FFDB4C RGB(255, 219, 76) RGBA(255, 219, 76, 1) string.quoted.single
#FFDB4C RGB(255, 219, 76) RGBA(255, 219, 76, 1) string.quoted.triple
#FFDB4C RGB(255, 219, 76) RGBA(255, 219, 76, 1) string.regexp
#89DDFF RGB(137, 221, 255) RGBA(137, 221, 255, 1) string.template
#FFDB4C RGB(255, 219, 76) RGBA(255, 219, 76, 1) string.unquoted
#FFDB4C RGB(255, 219, 76) RGBA(255, 219, 76, 1) support
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) support.class
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) support.constant
#FFDB4C RGB(255, 219, 76) RGBA(255, 219, 76, 1) support.function
#FFDB4C RGB(255, 219, 76) RGBA(255, 219, 76, 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
#4CD964 RGB(76, 217, 100) RGBA(76, 217, 100, 1) support.variable
#82AAFF RGB(130, 170, 255) RGBA(130, 170, 255, 1) variable
#4CD964 RGB(76, 217, 100) RGBA(76, 217, 100, 1) variable.function
#82AAFF RGB(130, 170, 255) RGBA(130, 170, 255, 1) variable.language
#FF5370 RGB(255, 83, 112) RGBA(255, 83, 112, 1) variable.name
#4CD964 RGB(76, 217, 100) RGBA(76, 217, 100, 1) variable.other
#4CD964 RGB(76, 217, 100) RGBA(76, 217, 100, 1) variable.other.constant
#4CD964 RGB(76, 217, 100) RGBA(76, 217, 100, 1) variable.other.property
#4CD964 RGB(76, 217, 100) RGBA(76, 217, 100, 1) variable.other.readwrite
#4CD964 RGB(76, 217, 100) RGBA(76, 217, 100, 1) variable.parameter
#4CD964 RGB(76, 217, 100) RGBA(76, 217, 100, 1)