Warm Glass
Publisher: Warm Glass StudioThemes in package: 1
A warm obsidian VS Code theme with an optional one-command macOS glass setup.
A warm obsidian VS Code theme with an optional one-command macOS glass setup.
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 |
|---|---|---|
| comment, punctuation.definition.comment | #77727C | italic |
| keyword, storage.type, storage.modifier, keyword.control | #F08B78 | — |
| entity.name.type, entity.name.class, entity.name.struct, entity.name.interface, support.type | #D8ACE8 | — |
| entity.name.function, support.function, meta.function-call, variable.function | #E8B564 | — |
| string, string.quoted, string.template | #A8D18D | — |
| constant.numeric, constant.language, constant.character | #C6A0F6 | — |
| variable, variable.other, meta.object-literal.key | #E9E4DC | — |
| variable.parameter, meta.function.parameters | #E7C9A7 | — |
| entity.name.tag, support.class.component | #F08B78 | — |
| entity.other.attribute-name, support.type.property-name | #D8ACE8 | — |
| keyword.operator, punctuation.accessor, punctuation.separator | #F39A79 | — |
| constant.other, support.constant, entity.name.namespace | #83D5C5 | — |
| invalid, invalid.illegal | #FFF4EC | — |
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}!`;
}