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
An old Hope with italics
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
#686B78 RGB(104, 107, 120) RGBA(104, 107, 120, 1) comment.block
#686B78 RGB(104, 107, 120) RGBA(104, 107, 120, 1) comment.block.documentation
#686B78 RGB(104, 107, 120) RGBA(104, 107, 120, 1) comment.line
#686B78 RGB(104, 107, 120) RGBA(104, 107, 120, 1) constant
#EF7C2A RGB(239, 124, 42) RGBA(239, 124, 42, 1) constant.character
#EF7C2A RGB(239, 124, 42) RGBA(239, 124, 42, 1) constant.character.escape
#EF7C2A RGB(239, 124, 42) RGBA(239, 124, 42, 1) constant.numeric
#EF7C2A RGB(239, 124, 42) RGBA(239, 124, 42, 1) constant.numeric.integer
#EF7C2A RGB(239, 124, 42) RGBA(239, 124, 42, 1) constant.numeric.float
#EF7C2A RGB(239, 124, 42) RGBA(239, 124, 42, 1) constant.numeric.hex
#EF7C2A RGB(239, 124, 42) RGBA(239, 124, 42, 1) constant.numeric.octal
#EF7C2A RGB(239, 124, 42) RGBA(239, 124, 42, 1) constant.other
#EF7C2A RGB(239, 124, 42) RGBA(239, 124, 42, 1) constant.other.placeholder
#EF7C2A RGB(239, 124, 42) RGBA(239, 124, 42, 1) entity
#4FB4D8 RGB(79, 180, 216) RGBA(79, 180, 216, 1) entity.name
#4FB4D8 RGB(79, 180, 216) RGBA(79, 180, 216, 1) entity.name.class
#E5CD52 RGB(229, 205, 82) RGBA(229, 205, 82, 1) entity.name.function
#E5CD52 RGB(229, 205, 82) RGBA(229, 205, 82, 1) entity.name.section
#4FB4D8 RGB(79, 180, 216) RGBA(79, 180, 216, 1) entity.name.tag
#EB3D54 RGB(235, 61, 84) RGBA(235, 61, 84, 1) entity.other
#E5CD52 RGB(229, 205, 82) RGBA(229, 205, 82, 1) entity.other.attribute-name
#E5CD52 RGB(229, 205, 82) RGBA(229, 205, 82, 1) entity.other.inherited-class
#4FB4D8 RGB(79, 180, 216) RGBA(79, 180, 216, 1) invalid
#EB3D54 RGB(235, 61, 84) RGBA(235, 61, 84, 1) invalid.deprecated
#EB3D54 RGB(235, 61, 84) RGBA(235, 61, 84, 1) invalid.illegal
#EB3D54 RGB(235, 61, 84) RGBA(235, 61, 84, 1) keyword
#78BD65 RGB(120, 189, 101) RGBA(120, 189, 101, 1) keyword.control
#78BD65 RGB(120, 189, 101) RGBA(120, 189, 101, 1) keyword.control.flow
#78BD65 RGB(120, 189, 101) RGBA(120, 189, 101, 1) keyword.operator
#78BD65 RGB(120, 189, 101) RGBA(120, 189, 101, 1) keyword.operator.new
#78BD65 RGB(120, 189, 101) RGBA(120, 189, 101, 1) keyword.operator.assignment
#78BD65 RGB(120, 189, 101) RGBA(120, 189, 101, 1) keyword.operator.arithmetic
#78BD65 RGB(120, 189, 101) RGBA(120, 189, 101, 1) keyword.operator.logical
#78BD65 RGB(120, 189, 101) RGBA(120, 189, 101, 1) keyword.other
#78BD65 RGB(120, 189, 101) RGBA(120, 189, 101, 1) markup
#EF7C2A RGB(239, 124, 42) RGBA(239, 124, 42, 1) markup.bold
#E5CD52 RGB(229, 205, 82) RGBA(229, 205, 82, 1) markup.italic
#EF7C2A RGB(239, 124, 42) RGBA(239, 124, 42, 1) markup.list
#EB3D54 RGB(235, 61, 84) RGBA(235, 61, 84, 1) markup.list.numbered
#EB3D54 RGB(235, 61, 84) RGBA(235, 61, 84, 1) markup.list.unnumbered
#EB3D54 RGB(235, 61, 84) RGBA(235, 61, 84, 1) markup.quote
#78BD65 RGB(120, 189, 101) RGBA(120, 189, 101, 1) meta
#78BD65 RGB(120, 189, 101) RGBA(120, 189, 101, 1) punctuation.definition.string.begin
#78BD65 RGB(120, 189, 101) RGBA(120, 189, 101, 1) punctuation.definition.string.end
#78BD65 RGB(120, 189, 101) RGBA(120, 189, 101, 1) storage
#EB3D54 RGB(235, 61, 84) RGBA(235, 61, 84, 1) storage.modifier
#EB3D54 RGB(235, 61, 84) RGBA(235, 61, 84, 1) storage.type
#EB3D54 RGB(235, 61, 84) RGBA(235, 61, 84, 1) string
#4FB4D8 RGB(79, 180, 216) RGBA(79, 180, 216, 1) string.interpolated
#4FB4D8 RGB(79, 180, 216) RGBA(79, 180, 216, 1) string.other
#4FB4D8 RGB(79, 180, 216) RGBA(79, 180, 216, 1) string.quoted
#4FB4D8 RGB(79, 180, 216) RGBA(79, 180, 216, 1) string.quoted.double
#4FB4D8 RGB(79, 180, 216) RGBA(79, 180, 216, 1) string.quoted.other
#4FB4D8 RGB(79, 180, 216) RGBA(79, 180, 216, 1) string.quoted.single
#4FB4D8 RGB(79, 180, 216) RGBA(79, 180, 216, 1) string.quoted.triple
#4FB4D8 RGB(79, 180, 216) RGBA(79, 180, 216, 1) string.regexp
#4FB4D8 RGB(79, 180, 216) RGBA(79, 180, 216, 1) string.template
#4FB4D8 RGB(79, 180, 216) RGBA(79, 180, 216, 1) string.unquoted
#4FB4D8 RGB(79, 180, 216) RGBA(79, 180, 216, 1) support
#CBCDD2 RGB(203, 205, 210) RGBA(203, 205, 210, 1) support.class
#EB3D54 RGB(235, 61, 84) RGBA(235, 61, 84, 1) support.constant
#EF7C2A RGB(239, 124, 42) RGBA(239, 124, 42, 1) support.function
#E5CD52 RGB(229, 205, 82) RGBA(229, 205, 82, 1) support.other
#CBCDD2 RGB(203, 205, 210) RGBA(203, 205, 210, 1) support.type
#EB3D54 RGB(235, 61, 84) RGBA(235, 61, 84, 1) support.type.primitive
#EB3D54 RGB(235, 61, 84) RGBA(235, 61, 84, 1) support.type.property-name
#EB3D54 RGB(235, 61, 84) RGBA(235, 61, 84, 1) variable
#CBCDD2 RGB(203, 205, 210) RGBA(203, 205, 210, 1) variable.function
#CBCDD2 RGB(203, 205, 210) RGBA(203, 205, 210, 1) variable.language
#78BD65 RGB(120, 189, 101) RGBA(120, 189, 101, 1) variable.name
#CBCDD2 RGB(203, 205, 210) RGBA(203, 205, 210, 1) variable.other
#CBCDD2 RGB(203, 205, 210) RGBA(203, 205, 210, 1) variable.other.constant
#CBCDD2 RGB(203, 205, 210) RGBA(203, 205, 210, 1) variable.other.property
#CBCDD2 RGB(203, 205, 210) RGBA(203, 205, 210, 1) variable.other.readwrite
#CBCDD2 RGB(203, 205, 210) RGBA(203, 205, 210, 1) variable.parameter
#E5CD52 RGB(229, 205, 82) RGBA(229, 205, 82, 1)