CodeBody
Publisher: RoniereThemes in package: 1
Full workbench mockup using this variant's colors and tokenColors.
Loading...
Workbench UI color keys from the theme JSON colors map.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| variable, entity.name.tag, entity.name.function | #00FFC2 | — |
| keyword, storage.type, support.type | #BB86FC | bold |
| string, string.template, string.quoted | #FFA726 | — |
| comment, punctuation.definition.comment | #616161 | italic |
| constant.numeric, constant.language | #FF5F8F | — |
| keyword.operator, punctuation | #00E5FF | — |
| entity.name.class, entity.name.type.class | #FFD700 | underline |
| entity.name.function, meta.method | #00FFC2 | italic |
| invalid, invalid.illegal | #CF6679 | bold italic |
| variable.language, variable.parameter | #81D4FA | — |
| markup.heading, markup.heading.setext | #BB86FC | bold |
| support.type.property-name.json | #00FFC2 | — |
| support.type.property-name.css | #81D4FA | — |
| entity.other.attribute-name | #FFA726 | — |
| markup.inserted | #00FFC250 | — |
| markup.deleted | #FF5F8F50 | — |
| string.regexp, constant.character.escape | #FF5F8F | — |
| punctuation.special, punctuation.accessor | #BB86FC | — |
TypeScript sample highlighted with this variant's colors and tokenColors.
Loading...
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}!`;
}
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}!`;
}