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
Riot
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
#777777 RGB(119, 119, 119) RGBA(119, 119, 119, 1) comment.block
#777777 RGB(119, 119, 119) RGBA(119, 119, 119, 1) comment.block.documentation
#777777 RGB(119, 119, 119) RGBA(119, 119, 119, 1) comment.line
#777777 RGB(119, 119, 119) RGBA(119, 119, 119, 1) constant
#4CBE00 RGB(76, 190, 0) RGBA(76, 190, 0, 1) constant.character
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) constant.character.escape
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) constant.numeric
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) constant.numeric.integer
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) constant.numeric.float
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) constant.numeric.hex
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) constant.numeric.octal
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) constant.other
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) constant.other.placeholder
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) entity
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) entity.name
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) entity.name.class
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) entity.name.function
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) entity.name.section
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) entity.name.tag
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) entity.other
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) entity.other.attribute-name
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) entity.other.inherited-class
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 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
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) keyword.control
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) keyword.control.flow
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) keyword.operator
#777777 RGB(119, 119, 119) RGBA(119, 119, 119, 1) keyword.operator.new
#777777 RGB(119, 119, 119) RGBA(119, 119, 119, 1) keyword.operator.assignment
#777777 RGB(119, 119, 119) RGBA(119, 119, 119, 1) keyword.operator.arithmetic
#777777 RGB(119, 119, 119) RGBA(119, 119, 119, 1) keyword.operator.logical
#777777 RGB(119, 119, 119) RGBA(119, 119, 119, 1) keyword.other
#8998B9 RGB(137, 152, 185) RGBA(137, 152, 185, 1) markup
#F7B83D RGB(247, 184, 61) RGBA(247, 184, 61, 1) markup.bold
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) markup.changed
#E6DB74 RGB(230, 219, 116) RGBA(230, 219, 116, 1) markup.deleted
#00A8C6 RGB(0, 168, 198) RGBA(0, 168, 198, 1) markup.inserted
#A6E22E RGB(166, 226, 46) RGBA(166, 226, 46, 1) markup.italic
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) markup.raw
#00A8C6 RGB(0, 168, 198) RGBA(0, 168, 198, 1) markup.underline
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) markup.underline.link
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) meta
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) meta.function
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) meta.tag
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) punctuation.definition.string.begin
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) punctuation.definition.string.end
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) punctuation.separator
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) storage
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) storage.modifier
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) storage.type
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) string
#4CBE00 RGB(76, 190, 0) RGBA(76, 190, 0, 1) string.interpolated
#4CBE00 RGB(76, 190, 0) RGBA(76, 190, 0, 1) string.other
#4CBE00 RGB(76, 190, 0) RGBA(76, 190, 0, 1) string.quoted
#4CBE00 RGB(76, 190, 0) RGBA(76, 190, 0, 1) string.quoted.double
#4CBE00 RGB(76, 190, 0) RGBA(76, 190, 0, 1) string.quoted.other
#4CBE00 RGB(76, 190, 0) RGBA(76, 190, 0, 1) string.quoted.single
#4CBE00 RGB(76, 190, 0) RGBA(76, 190, 0, 1) string.quoted.triple
#4CBE00 RGB(76, 190, 0) RGBA(76, 190, 0, 1) string.regexp
#4CBE00 RGB(76, 190, 0) RGBA(76, 190, 0, 1) string.template
#4CBE00 RGB(76, 190, 0) RGBA(76, 190, 0, 1) string.unquoted
#4CBE00 RGB(76, 190, 0) RGBA(76, 190, 0, 1) support
#CCCCCC RGB(204, 204, 204) RGBA(204, 204, 204, 1) support.class
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) support.constant
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) support.function
#25D0EC RGB(37, 208, 236) RGBA(37, 208, 236, 1) support.other
#CCCCCC RGB(204, 204, 204) RGBA(204, 204, 204, 1) support.type
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) support.type.primitive
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) support.type.property-name
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) support.variable
#CCCCCC RGB(204, 204, 204) RGBA(204, 204, 204, 1) variable
#4CBE00 RGB(76, 190, 0) RGBA(76, 190, 0, 1) variable.language
#DB386B RGB(219, 56, 107) RGBA(219, 56, 107, 1) variable.other
#CCCCCC RGB(204, 204, 204) RGBA(204, 204, 204, 1) variable.other.constant
#CCCCCC RGB(204, 204, 204) RGBA(204, 204, 204, 1) variable.other.property
#CCCCCC RGB(204, 204, 204) RGBA(204, 204, 204, 1) variable.other.readwrite
#CCCCCC RGB(204, 204, 204) RGBA(204, 204, 204, 1) variable.parameter
#CCCCCC RGB(204, 204, 204) RGBA(204, 204, 204, 1)