DeerAntlerDark Theme
Publisher: geraneThemes in package: 1
DeerAntlerDark Theme ported from the DeerAntlerDark TextMate Theme
DeerAntlerDark Theme ported from the DeerAntlerDark TextMate Theme
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #F8F8F2 | — |
| comment | #6b6b6b | — |
| string | #a086b4 | — |
| constant.numeric | #8b5ea1 | — |
| constant.language | #8b5ea1 | — |
| constant.character, constant.other | #8b5ea1 | bold |
| variable | — | |
| keyword | #9f3c48 | — |
| storage | #9f3c47 | |
| storage.type | #4caec1 | italic |
| entity.name.class | #acec33 | underline |
| entity.other.inherited-class | #A6E22E | italic underline |
| entity.name.function | #a2df2f | |
| variable.parameter | #b89844 | italic |
| entity.name.tag | #cb536a | |
| entity.other.attribute-name | #82a8ca | |
| support.function | #43a0b2 | — |
| support.constant | #8b5ea1 | |
| support.type, support.class | #576ea4 | italic |
| support.other.variable | — | |
| invalid | #F8F8F0 | |
| invalid.deprecated | #F8F8F0 | — |
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}!`;
}