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
Dracula Pure
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA activityBarBadge.background
#007ACC RGB(0, 122, 204) RGBA(0, 122, 204, 1) editor.background
#282A36 RGB(40, 42, 54) RGBA(40, 42, 54, 1) editor.foreground
#F8F8F2 RGB(248, 248, 242) RGBA(248, 248, 242, 1) editor.lineHighlightBackground
#00000000 RGB(0, 0, 0) RGBA(0, 0, 0, 0) editor.lineHighlightBorder
#77777755 RGB(119, 119, 119) RGBA(119, 119, 119, 0.333) sideBarTitle.foreground
#BBBBBB RGB(187, 187, 187) RGBA(187, 187, 187, 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
#6272A4 RGB(98, 114, 164) RGBA(98, 114, 164, 1) comment.block
#6272A4 RGB(98, 114, 164) RGBA(98, 114, 164, 1) comment.block.documentation
#6272A4 RGB(98, 114, 164) RGBA(98, 114, 164, 1) comment.line
#6272A4 RGB(98, 114, 164) RGBA(98, 114, 164, 1) constant
#FF79C6 RGB(255, 121, 198) RGBA(255, 121, 198, 1) constant.character
#BD93F9 RGB(189, 147, 249) RGBA(189, 147, 249, 1) constant.character.escape
#FF79C6 RGB(255, 121, 198) RGBA(255, 121, 198, 1) constant.numeric
#BD93F9 RGB(189, 147, 249) RGBA(189, 147, 249, 1) constant.numeric.integer
#BD93F9 RGB(189, 147, 249) RGBA(189, 147, 249, 1) constant.numeric.float
#BD93F9 RGB(189, 147, 249) RGBA(189, 147, 249, 1) constant.numeric.hex
#BD93F9 RGB(189, 147, 249) RGBA(189, 147, 249, 1) constant.numeric.octal
#BD93F9 RGB(189, 147, 249) RGBA(189, 147, 249, 1) constant.other
#BD93F9 RGB(189, 147, 249) RGBA(189, 147, 249, 1) constant.other.placeholder
#BD93F9 RGB(189, 147, 249) RGBA(189, 147, 249, 1) entity
#F1FA8C RGB(241, 250, 140) RGBA(241, 250, 140, 1) entity.name
#50FA7B RGB(80, 250, 123) RGBA(80, 250, 123, 1) entity.name.class
#50FA7B RGB(80, 250, 123) RGBA(80, 250, 123, 1) entity.name.function
#50FA7B RGB(80, 250, 123) RGBA(80, 250, 123, 1) entity.name.method
#50FA7B RGB(80, 250, 123) RGBA(80, 250, 123, 1) entity.name.namespace
#50FA7B RGB(80, 250, 123) RGBA(80, 250, 123, 1) entity.name.section
#50FA7B RGB(80, 250, 123) RGBA(80, 250, 123, 1) entity.name.selector
#50FA7B RGB(80, 250, 123) RGBA(80, 250, 123, 1) entity.name.tag
#FF79C6 RGB(255, 121, 198) RGBA(255, 121, 198, 1) entity.name.type
#50FA7B RGB(80, 250, 123) RGBA(80, 250, 123, 1) entity.name.type.enum
#50FA7B RGB(80, 250, 123) RGBA(80, 250, 123, 1) entity.name.type.interface
#50FA7B RGB(80, 250, 123) RGBA(80, 250, 123, 1) entity.name.type.struct
#50FA7B RGB(80, 250, 123) RGBA(80, 250, 123, 1) entity.other
#50FA7B RGB(80, 250, 123) RGBA(80, 250, 123, 1) entity.other.attribute-name
#50FA7B RGB(80, 250, 123) RGBA(80, 250, 123, 1) invalid
#F8F8F0 RGB(248, 248, 240) RGBA(248, 248, 240, 1) invalid.deprecated
#F8F8F0 RGB(248, 248, 240) RGBA(248, 248, 240, 1) invalid.illegal
#F8F8F0 RGB(248, 248, 240) RGBA(248, 248, 240, 1) keyword
#FF79C6 RGB(255, 121, 198) RGBA(255, 121, 198, 1) keyword.control
#FF79C6 RGB(255, 121, 198) RGBA(255, 121, 198, 1) keyword.control.flow
#FF79C6 RGB(255, 121, 198) RGBA(255, 121, 198, 1) keyword.operator
#FF79C6 RGB(255, 121, 198) RGBA(255, 121, 198, 1) keyword.operator.new
#FF79C6 RGB(255, 121, 198) RGBA(255, 121, 198, 1) keyword.operator.assignment
#FF79C6 RGB(255, 121, 198) RGBA(255, 121, 198, 1) keyword.operator.arithmetic
#FF79C6 RGB(255, 121, 198) RGBA(255, 121, 198, 1) keyword.operator.logical
#FF79C6 RGB(255, 121, 198) RGBA(255, 121, 198, 1) keyword.other
#FF79C6 RGB(255, 121, 198) RGBA(255, 121, 198, 1) markup
#F1FA8C RGB(241, 250, 140) RGBA(241, 250, 140, 1) markup.changed
#F1FA8C RGB(241, 250, 140) RGBA(241, 250, 140, 1) markup.deleted
#FF79C6 RGB(255, 121, 198) RGBA(255, 121, 198, 1) markup.inserted
#50FA7B RGB(80, 250, 123) RGBA(80, 250, 123, 1) meta
#EEEEEE RGB(238, 238, 238) RGBA(238, 238, 238, 1) storage
#FF79C6 RGB(255, 121, 198) RGBA(255, 121, 198, 1) storage.modifier
#FF79C6 RGB(255, 121, 198) RGBA(255, 121, 198, 1) storage.type
#8BE9FD RGB(139, 233, 253) RGBA(139, 233, 253, 1) string
#F1FA8C RGB(241, 250, 140) RGBA(241, 250, 140, 1) string.interpolated
#F1FA8C RGB(241, 250, 140) RGBA(241, 250, 140, 1) string.other
#F1FA8C RGB(241, 250, 140) RGBA(241, 250, 140, 1) string.quoted
#F1FA8C RGB(241, 250, 140) RGBA(241, 250, 140, 1) string.quoted.double
#F1FA8C RGB(241, 250, 140) RGBA(241, 250, 140, 1) string.quoted.other
#F1FA8C RGB(241, 250, 140) RGBA(241, 250, 140, 1) string.quoted.single
#F1FA8C RGB(241, 250, 140) RGBA(241, 250, 140, 1) string.quoted.triple
#F1FA8C RGB(241, 250, 140) RGBA(241, 250, 140, 1) string.regexp
#F1FA8C RGB(241, 250, 140) RGBA(241, 250, 140, 1) string.template
#F1FA8C RGB(241, 250, 140) RGBA(241, 250, 140, 1) string.unquoted
#F1FA8C RGB(241, 250, 140) RGBA(241, 250, 140, 1) support
#FFB86C RGB(255, 184, 108) RGBA(255, 184, 108, 1) support.class
#8BE9FD RGB(139, 233, 253) RGBA(139, 233, 253, 1) support.constant
#8BE9FD RGB(139, 233, 253) RGBA(139, 233, 253, 1) support.function
#8BE9FD RGB(139, 233, 253) RGBA(139, 233, 253, 1) support.type
#8BE9FD RGB(139, 233, 253) RGBA(139, 233, 253, 1) support.type.primitive
#8BE9FD RGB(139, 233, 253) RGBA(139, 233, 253, 1) support.type.property-name
#FFB86C RGB(255, 184, 108) RGBA(255, 184, 108, 1) variable
#F8F8F2 RGB(248, 248, 242) RGBA(248, 248, 242, 1) variable.function
#F8F8F2 RGB(248, 248, 242) RGBA(248, 248, 242, 1) variable.language
#BD93F9 RGB(189, 147, 249) RGBA(189, 147, 249, 1) variable.name
#F8F8F2 RGB(248, 248, 242) RGBA(248, 248, 242, 1) variable.other
#F8F8F2 RGB(248, 248, 242) RGBA(248, 248, 242, 1) variable.other.constant
#F8F8F2 RGB(248, 248, 242) RGBA(248, 248, 242, 1) variable.other.property
#F8F8F2 RGB(248, 248, 242) RGBA(248, 248, 242, 1) variable.other.readwrite
#F8F8F2 RGB(248, 248, 242) RGBA(248, 248, 242, 1) variable.parameter
#FFB86C RGB(255, 184, 108) RGBA(255, 184, 108, 1)