Darktooth Theme
Publisher: PoorchopThemes in package: 1
Port of the Darktooth theme originally for Emacs
Port of the Darktooth theme originally for Emacs
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #FDF4C1 | — |
| comment | #7C6F64 | — |
| string | #528B8B | — |
| constant.numeric | #D3869B | — |
| constant.language | #BBAA97 | — |
| constant.character, constant.other | #BBAA97 | — |
| variable | #83A598 | |
| keyword | #DD6F48 | — |
| storage | #DD6F48 | |
| storage.type | #66999D | — |
| entity.name.class | #A89984 | underline |
| entity.other.inherited-class | #A89984 | italic underline |
| entity.name.function | #A89984 | |
| variable.parameter | #83A598 | italic |
| entity.name.tag | #A89984 | |
| entity.other.attribute-name | #83A598 | |
| support.function | #FE8019 | |
| support.constant | #FE8019 | |
| support.type, support.class | #FE8019 | italic |
| support.other.variable | — | |
| invalid | #FFFFFF | bold |
| invalid.deprecated | #FFFFFF | bold |
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}!`;
}