nkalai Theme
Publisher: Tsepo NkalaiThemes in package: 2
Paired light/dark Visual Studio Code themes with a dimmed light variant and a shared #77B58D accent for balanced day/night use.
Paired light/dark Visual Studio Code themes with a dimmed light variant and a shared #77B58D accent for balanced day/night use.
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, string.comment | #7f9916 | italic |
| string, string.template, constant.character.escape, string.regexp, constant.other.symbol, support.constant | #078a4f | — |
| keyword, storage, storage.type, storage.modifier | #e6c791 | — |
| entity.name.function, meta.function-call, support.function | #7db19c | — |
| variable, entity.name.variable, meta.property-name, meta.property.accessor, meta.property.object, meta.property, variable.other.property, variable.other.readwrite | #ab7e58 | — |
| entity.name.type, support.type, entity.name.class, storage.type.class | #E09B61 | — |
| constant, constant.numeric, support.constant | #c35240 | — |
| constant.numeric, support.constant.numeric | #c35240 | — |
| keyword.operator, punctuation.definition.tag, punctuation.separator, punctuation.terminator | #B3A799 | — |
| meta.decorator, storage.modifier.annotation | #87BFA8 | — |
| support.type.property-name.json, meta.object-literal.key, meta.mapping.key.json, support.type.property-name, variable.other.property | #6499b5 | — |
| meta.structure.dictionary.json string.quoted.double.json | #E09B61 | — |
| entity.name.tag, support.class.component, meta.tag | #6499b5 | — |
| entity.other.attribute-name, meta.tag.attribute-name, support.variable.attribute | #8FCAB7 | — |
| support.type.property-name.css, meta.property-list.css meta.property-name, entity.other.attribute-name.css | #c19b76 | — |
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}!`;
}