Toothpaste
Publisher: Aalaap GhagThemes in package: 1
A custom theme with flavorful colors that pop and are muted where necessary.
A custom theme with flavorful colors that pop and are muted where necessary.
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #DAE3E8 | — |
| comment | #465E68 | — |
| string | #DBCD7F | — |
| constant.numeric | #9DC777 | — |
| constant.language | #E36868 | — |
| constant.character, constant.other | #E36868 | — |
| variable | — | |
| keyword | #6FBF6FD4 | — |
| storage | #DBCD7F | — |
| storage.type | #73b3c0ff | italic |
| entity.name.class | #97B853 | underline |
| entity.other.inherited-class | #97b853ff | italic underline |
| entity.name.function | #97b853ff | — |
| variable.parameter | #c88e4bff | italic |
| entity.name.tag | #DAE3E8 | — |
| entity.other.attribute-name | #DAE3E8 | — |
| support.function | #769EB3 | — |
| support.constant | #769EB3 | |
| support.type, support.class | #769EB3 | — |
| support.other.variable | — | |
| invalid | #c5c5c0ff | |
| invalid.deprecated | #c5c5c0ff | — |
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}!`;
}