Alt's Theme
Publisher: amrahman96Themes in package: 1
A theme that is nice
A theme that is nice
Full workbench mockup using this variant's colors and tokenColors.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #51514cff | — |
| comment | #88a687ff | italic |
| string | #FF0000 | — |
| constant.numeric | #d46906ff | — |
| constant.language |
TypeScript sample highlighted with this variant's colors and tokenColors.
| — |
| constant.character, constant.other | #68499eff | — |
| variable | #073A57 |
| keyword | #068d6eff | — |
| storage | #06228dff |
| storage.type | #068ea6ff | — |
| entity.name.class | #3823bbff | underline |
| entity.other.inherited-class | #3e18b0ff | underline italic |
| entity.name.function | #E01B7E |
| variable.parameter | #d2801fff | italic |
| entity.name.tag | #cf2563ff |
| entity.other.attribute-name | #8cbc2bff | — |
| support.function | #75365C | — |
| support.constant | #75365C | — |
| support.type, support.class | #75365C | italic |
| support.other.variable | #75365C |
| invalid | #cecec7ff |
| invalid.deprecated | #cecec7ff | — |
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}!`;
}