datum
Publisher: w0zroThemes in package: 2
A colorscheme derived from color science — light + dark, contrast-verified, colorblind-safe.
A colorscheme derived from color science — light + dark, contrast-verified, colorblind-safe.
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 | #8f98a3 | italic |
| string, string.quoted, constant.other.symbol | #51daa7 | — |
| constant.numeric, constant.numeric.integer, constant.numeric.float | #e6ac4c | — |
| constant.language, constant.character, support.constant | #d8cf58 | — |
| variable.other.constant, entity.name.constant | #d8cf58 | — |
| keyword, keyword.control, storage, storage.type, storage.modifier | #66b6f4 | — |
| keyword.operator | #b2dafb | — |
| entity.name.function, meta.function-call, support.function | #db78b1 | — |
| entity.name.type, entity.name.class, support.type, support.class | #5ddae0 | — |
| variable, meta.definition.variable | #fcdcad | — |
| variable.parameter | #a5f5f9 | — |
| variable.other.property, meta.object-literal.key | #fcdcad | — |
| punctuation, meta.brace, punctuation.separator, punctuation.terminator | #8f98a3 | — |
| entity.name.tag | #db78b1 | — |
| entity.other.attribute-name | #e6ac4c | — |
| markup.heading, entity.name.section | #66b6f4 | bold |
| markup.bold | #dbe0e8 | bold |
| markup.italic | #dbe0e8 | italic |
| markup.inserted, markup.inline.raw | #51daa7 | — |
| markup.deleted | #ef844a | — |
| invalid, invalid.illegal | #ef844a | — |
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}!`;
}