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
RailsCasts
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
#BC9458 RGB(188, 148, 88) RGBA(188, 148, 88, 1) comment.block
#BC9458 RGB(188, 148, 88) RGBA(188, 148, 88, 1) comment.block.documentation
#BC9458 RGB(188, 148, 88) RGBA(188, 148, 88, 1) comment.line
#BC9458 RGB(188, 148, 88) RGBA(188, 148, 88, 1) constant
#6D9CBE RGB(109, 156, 190) RGBA(109, 156, 190, 1) constant.character
#6D9CBE RGB(109, 156, 190) RGBA(109, 156, 190, 1) constant.character.escape
#519F50 RGB(81, 159, 80) RGBA(81, 159, 80, 1) constant.numeric
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) constant.numeric.integer
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) constant.numeric.float
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) constant.numeric.hex
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) constant.numeric.octal
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) constant.other
#6D9CBE RGB(109, 156, 190) RGBA(109, 156, 190, 1) constant.other.placeholder
#6D9CBE RGB(109, 156, 190) RGBA(109, 156, 190, 1) constant.regexp
#6D9CBE RGB(109, 156, 190) RGBA(109, 156, 190, 1) constant.rgb-value
#6D9CBE RGB(109, 156, 190) RGBA(109, 156, 190, 1) entity
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) entity.name
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) entity.name.class
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) entity.name.function
#FFC66D RGB(255, 198, 109) RGBA(255, 198, 109, 1) entity.name.method
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) entity.name.namespace
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) entity.name.section
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) entity.name.selector
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) entity.name.tag
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) entity.name.type
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) entity.name.type.enum
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) entity.name.type.interface
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) entity.name.type.struct
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) entity.other
#E8BF6A RGB(232, 191, 106) RGBA(232, 191, 106, 1) entity.other.attribute-name
#E8BF6A RGB(232, 191, 106) RGBA(232, 191, 106, 1) invalid
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) invalid.deprecated
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) invalid.illegal
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) keyword
#CC7833 RGB(204, 120, 51) RGBA(204, 120, 51, 1) keyword.control
#CC7833 RGB(204, 120, 51) RGBA(204, 120, 51, 1) keyword.control.flow
#CC7833 RGB(204, 120, 51) RGBA(204, 120, 51, 1) keyword.operator
#CC7833 RGB(204, 120, 51) RGBA(204, 120, 51, 1) keyword.operator.new
#CC7833 RGB(204, 120, 51) RGBA(204, 120, 51, 1) keyword.operator.assignment
#CC7833 RGB(204, 120, 51) RGBA(204, 120, 51, 1) keyword.operator.arithmetic
#CC7833 RGB(204, 120, 51) RGBA(204, 120, 51, 1) keyword.operator.logical
#CC7833 RGB(204, 120, 51) RGBA(204, 120, 51, 1) keyword.other
#CC7833 RGB(204, 120, 51) RGBA(204, 120, 51, 1) markup
#967EFB RGB(150, 126, 251) RGBA(150, 126, 251, 1) markup.changed
#967EFB RGB(150, 126, 251) RGBA(150, 126, 251, 1) markup.deleted
#F92672 RGB(249, 38, 114) RGBA(249, 38, 114, 1) markup.inserted
#A6E22E RGB(166, 226, 46) RGBA(166, 226, 46, 1) meta
#E8BF6A RGB(232, 191, 106) RGBA(232, 191, 106, 1) meta.tag
#E8BF6A RGB(232, 191, 106) RGBA(232, 191, 106, 1) storage
#CC7833 RGB(204, 120, 51) RGBA(204, 120, 51, 1) storage.modifier
#CC7833 RGB(204, 120, 51) RGBA(204, 120, 51, 1) storage.type
#CC7833 RGB(204, 120, 51) RGBA(204, 120, 51, 1) string
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.interpolated
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.other
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.quoted
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.quoted.double
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.quoted.other
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.quoted.single
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.quoted.triple
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.regexp
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.template
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) string.unquoted
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) support
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) support.constant
#A5C261 RGB(165, 194, 97) RGBA(165, 194, 97, 1) support.function
#DA4939 RGB(218, 73, 57) RGBA(218, 73, 57, 1) support.type
#6E9CBE RGB(110, 156, 190) RGBA(110, 156, 190, 1) support.type.primitive
#6E9CBE RGB(110, 156, 190) RGBA(110, 156, 190, 1) support.type.property-name
#6E9CBE RGB(110, 156, 190) RGBA(110, 156, 190, 1) variable
#D0D0FF RGB(208, 208, 255) RGBA(208, 208, 255, 1) variable.function
#D0D0FF RGB(208, 208, 255) RGBA(208, 208, 255, 1) variable.language
#D0D0FF RGB(208, 208, 255) RGBA(208, 208, 255, 1) variable.name
#D0D0FF RGB(208, 208, 255) RGBA(208, 208, 255, 1) variable.other
#D0D0FF RGB(208, 208, 255) RGBA(208, 208, 255, 1) variable.other.constant
#DA4939 RGB(218, 73, 57) RGBA(218, 73, 57, 1) variable.other.property
#D0D0FF RGB(208, 208, 255) RGBA(208, 208, 255, 1) variable.other.readwrite
#D0D0FF RGB(208, 208, 255) RGBA(208, 208, 255, 1) variable.parameter
#D0D0FF RGB(208, 208, 255) RGBA(208, 208, 255, 1)