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
Inspired Github
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
#969896 RGB(150, 152, 150) RGBA(150, 152, 150, 1) comment.block
#969896 RGB(150, 152, 150) RGBA(150, 152, 150, 1) comment.block.documentation
#969896 RGB(150, 152, 150) RGBA(150, 152, 150, 1) comment.line
#969896 RGB(150, 152, 150) RGBA(150, 152, 150, 1) constant
#ED6A43 RGB(237, 106, 67) RGBA(237, 106, 67, 1) constant.character
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) constant.character.escape
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) constant.numeric
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) constant.numeric.integer
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) constant.numeric.float
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) constant.numeric.hex
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) constant.numeric.octal
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) constant.other
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) constant.other.placeholder
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) entity
#795DA3 RGB(121, 93, 163) RGBA(121, 93, 163, 1) entity.name
#795DA3 RGB(121, 93, 163) RGBA(121, 93, 163, 1) entity.name.class
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) entity.name.function
#323232 RGB(50, 50, 50) RGBA(50, 50, 50, 1) entity.name.tag
#63A35C RGB(99, 163, 92) RGBA(99, 163, 92, 1) entity.name.type
#795DA3 RGB(121, 93, 163) RGBA(121, 93, 163, 1) entity.other
#795DA3 RGB(121, 93, 163) RGBA(121, 93, 163, 1) entity.other.attribute-name
#795DA3 RGB(121, 93, 163) RGBA(121, 93, 163, 1) entity.other.inherited-class
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) invalid
#B52A1D RGB(181, 42, 29) RGBA(181, 42, 29, 1) invalid.deprecated
#B52A1D RGB(181, 42, 29) RGBA(181, 42, 29, 1) invalid.illegal
#B52A1D RGB(181, 42, 29) RGBA(181, 42, 29, 1) keyword
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) keyword.control
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) keyword.control.flow
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) keyword.operator
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) keyword.operator.new
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) keyword.operator.assignment
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) keyword.operator.arithmetic
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) keyword.operator.logical
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) keyword.other
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) markup
#ED6A43 RGB(237, 106, 67) RGBA(237, 106, 67, 1) markup.changed
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) markup.deleted
#BD2C00 RGB(189, 44, 0) RGBA(189, 44, 0, 1) markup.inserted
#55A532 RGB(85, 165, 50) RGBA(85, 165, 50, 1) markup.list
#ED6A43 RGB(237, 106, 67) RGBA(237, 106, 67, 1) markup.list.numbered
#ED6A43 RGB(237, 106, 67) RGBA(237, 106, 67, 1) markup.list.unnumbered
#ED6A43 RGB(237, 106, 67) RGBA(237, 106, 67, 1) markup.raw
#323232 RGB(50, 50, 50) RGBA(50, 50, 50, 1) meta
#4183C4 RGB(65, 131, 196) RGBA(65, 131, 196, 1) meta.function
#795DA3 RGB(121, 93, 163) RGBA(121, 93, 163, 1) punctuation.definition.bracket
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) punctuation.definition.comment
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) punctuation.definition.string.begin
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) punctuation.definition.string.end
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) storage
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) storage.modifier
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) storage.type
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) string
#183691 RGB(24, 54, 145) RGBA(24, 54, 145, 1) string.interpolated
#183691 RGB(24, 54, 145) RGBA(24, 54, 145, 1) string.other
#183691 RGB(24, 54, 145) RGBA(24, 54, 145, 1) string.quoted
#183691 RGB(24, 54, 145) RGBA(24, 54, 145, 1) string.quoted.double
#183691 RGB(24, 54, 145) RGBA(24, 54, 145, 1) string.quoted.other
#183691 RGB(24, 54, 145) RGBA(24, 54, 145, 1) string.quoted.single
#183691 RGB(24, 54, 145) RGBA(24, 54, 145, 1) string.quoted.triple
#183691 RGB(24, 54, 145) RGBA(24, 54, 145, 1) string.regexp
#183691 RGB(24, 54, 145) RGBA(24, 54, 145, 1) string.template
#183691 RGB(24, 54, 145) RGBA(24, 54, 145, 1) string.unquoted
#183691 RGB(24, 54, 145) RGBA(24, 54, 145, 1) support
#795DA3 RGB(121, 93, 163) RGBA(121, 93, 163, 1) support.class
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) support.constant
#323232 RGB(50, 50, 50) RGBA(50, 50, 50, 1) support.function
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) support.other
#323232 RGB(50, 50, 50) RGBA(50, 50, 50, 1) support.type
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) support.type.primitive
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) support.type.property-name
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) variable
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) variable.function
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) variable.language
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) variable.name
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) variable.other
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) variable.other.constant
#0086B3 RGB(0, 134, 179) RGBA(0, 134, 179, 1) variable.other.property
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) variable.other.readwrite
#A71D5D RGB(167, 29, 93) RGBA(167, 29, 93, 1) variable.parameter
#323232 RGB(50, 50, 50) RGBA(50, 50, 50, 1)