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 Pro
colors Workbench UI color keys from the theme JSON colors map.
key HEX RGB RGBA editor.background
#1E1C1C RGB(30, 28, 28) RGBA(30, 28, 28, 1) editor.foreground
#E6E1DC RGB(230, 225, 220) RGBA(230, 225, 220, 1) editor.lineHighlightBackground
#333435 RGB(51, 52, 53) RGBA(51, 52, 53, 1) editor.selectionBackground
#5A647EE0 RGB(90, 100, 126) RGBA(90, 100, 126, 0.878) editorCursor.foreground
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) editorWhitespace.foreground
#404040 RGB(64, 64, 64) RGBA(64, 64, 64, 1)
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
#4DADC5 RGB(77, 173, 197) RGBA(77, 173, 197, 1) constant.character
#4DADC5 RGB(77, 173, 197) RGBA(77, 173, 197, 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
#4DADC5 RGB(77, 173, 197) RGBA(77, 173, 197, 1) constant.other.placeholder
#4DADC5 RGB(77, 173, 197) RGBA(77, 173, 197, 1) constant.regexp
#4DADC5 RGB(77, 173, 197) RGBA(77, 173, 197, 1) constant.rgb-value
#4DADC5 RGB(77, 173, 197) RGBA(77, 173, 197, 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
#E893C2 RGB(232, 147, 194) RGBA(232, 147, 194, 1) entity.other.attribute-name
#E893C2 RGB(232, 147, 194) RGBA(232, 147, 194, 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
#E6E1DC RGB(230, 225, 220) RGBA(230, 225, 220, 1) markup.deleted
#E6E1DC RGB(230, 225, 220) RGBA(230, 225, 220, 1) markup.inserted
#E6E1DC RGB(230, 225, 220) RGBA(230, 225, 220, 1) meta
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 1) meta.tag
#FFFFFF RGB(255, 255, 255) RGBA(255, 255, 255, 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
#4DADC5 RGB(77, 173, 197) RGBA(77, 173, 197, 1) support.type.primitive
#4DADC5 RGB(77, 173, 197) RGBA(77, 173, 197, 1) support.type.property-name
#4DADC5 RGB(77, 173, 197) RGBA(77, 173, 197, 1) variable
#DA4939 RGB(218, 73, 57) RGBA(218, 73, 57, 1) variable.other
#DA4939 RGB(218, 73, 57) RGBA(218, 73, 57, 1) variable.other.constant
#DA4939 RGB(218, 73, 57) RGBA(218, 73, 57, 1) variable.other.readwrite
#CCCCFA RGB(204, 204, 250) RGBA(204, 204, 250, 1)