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
Colonoscopy
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
#AEAEAE RGB(174, 174, 174) RGBA(174, 174, 174, 1) comment.block
#AEAEAE RGB(174, 174, 174) RGBA(174, 174, 174, 1) comment.block.documentation
#AEAEAE RGB(174, 174, 174) RGBA(174, 174, 174, 1) comment.line
#AEAEAE RGB(174, 174, 174) RGBA(174, 174, 174, 1) constant
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) constant.character
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) constant.character.escape
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) constant.numeric
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) constant.numeric.integer
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) constant.numeric.float
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) constant.numeric.hex
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) constant.numeric.octal
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) constant.other
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) constant.other.placeholder
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) constant.regexp
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) constant.rgb-value
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) entity
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) entity.name
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) entity.name.class
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) entity.name.function
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) entity.name.method
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) entity.name.namespace
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) entity.name.section
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) entity.name.selector
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) entity.name.tag
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) entity.name.type
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) entity.name.type.enum
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) entity.name.type.interface
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) entity.name.type.struct
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) invalid
#F3D651 RGB(243, 214, 81) RGBA(243, 214, 81, 1) invalid.deprecated
#F3D651 RGB(243, 214, 81) RGBA(243, 214, 81, 1) invalid.illegal
#F3D651 RGB(243, 214, 81) RGBA(243, 214, 81, 1) keyword
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) keyword.control
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) keyword.control.flow
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) keyword.operator
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) keyword.operator.new
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) keyword.operator.assignment
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) keyword.operator.arithmetic
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) keyword.operator.logical
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) keyword.other
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) storage
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) storage.modifier
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) storage.type
#A1877E RGB(161, 135, 126) RGBA(161, 135, 126, 1) string
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) string.interpolated
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) string.other
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) string.quoted
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) string.quoted.double
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) string.quoted.other
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) string.quoted.single
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) string.quoted.triple
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) string.regexp
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) string.template
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) string.unquoted
#B9A185 RGB(185, 161, 133) RGBA(185, 161, 133, 1) variable
#8D776E RGB(141, 119, 110) RGBA(141, 119, 110, 1) variable.function
#8D776E RGB(141, 119, 110) RGBA(141, 119, 110, 1) variable.language
#8D776E RGB(141, 119, 110) RGBA(141, 119, 110, 1) variable.name
#8D776E RGB(141, 119, 110) RGBA(141, 119, 110, 1) variable.other
#8D776E RGB(141, 119, 110) RGBA(141, 119, 110, 1) variable.other.constant
#8D776E RGB(141, 119, 110) RGBA(141, 119, 110, 1) variable.other.property
#8D776E RGB(141, 119, 110) RGBA(141, 119, 110, 1) variable.other.readwrite
#8D776E RGB(141, 119, 110) RGBA(141, 119, 110, 1) variable.parameter
#8D776E RGB(141, 119, 110) RGBA(141, 119, 110, 1)