DzSolarized
Publisher: Chris DzombakThemes in package: 4
Solarized-derived theme reflecting @cdzombak's personal preferences
Solarized-derived theme reflecting @cdzombak's personal preferences
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 | #859900 | italic |
| keyword | #B58900 | — |
| storage.type, storage.modifier | #B58900 | — |
| entity.name.namespace | #6C6FC4 | — |
| meta.function.call | #6C6FC4 | — |
| constant.other | #6C6FC4 | — |
| entity.name.function.macro | #CB4B16 | — |
| keyword.control | #859900 | — |
| keyword.operator | #839496 | — |
| string, string.quoted | #2AA198 | — |
| constant.numeric, constant.language | #CB4B16 | — |
| constant.character.escape | #2AA198 | bold |
| entity.name.function, support.function | #2AA198 | — |
| entity.name.type, entity.name.class, support.type, support.class | #B58900 | — |
| entity.name.type | #CB4B16 | — |
| entity.name.type.class.abstract | — | italic |
| entity.name.type.result | — | italic |
| variable, support.variable | #839496 | — |
| variable.parameter | #CB4B16 | — |
| entity.name.tag | #268BD2 | bold |
| entity.other.attribute-name | #657B83 | — |
| meta.annotation, storage.type.annotation | #859900 | — |
| entity.name.function.decorator, meta.decorator | #6C6FC4 | — |
| constant.language.boolean | #268BD2 | — |
| invalid, invalid.illegal | #DC322F | — |
| invalid.deprecated | #DC322F | strikethrough |
| markup.heading | #CB4B16 | bold |
| markup.bold | — | bold |
| markup.italic | — | italic |
| markup.underline.link | #268BD2 | — |
| punctuation.definition.string.begin, punctuation.definition.string.end | #2AA198 | — |
| punctuation | #859900 | — |
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}!`;
}