theme-flat-ui-minimal
Publisher: pzuraqThemes in package: 1
More minimal version of the flat-ui theme
More minimal version of the flat-ui theme
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 |
|---|---|---|
| — | #414141ff | — |
| comment | #595959 | italic |
| string | #05ad97 | — |
| constant.numeric, support.constant, constant.character | #cc5200 | — |
| constant.language | #ef434f | — |
| constant.character, constant.other | #d37612 | — |
| >constant.other.object.key,constant.other.object.key.js | #05ad97 | — |
| variable | #0f8ebd | |
| variable.other,meta.object.member | #0f8ebd | |
| variable.other.property | #a15ebb | — |
| support.other.variable | #007ae6 | bold |
| variable.language | #05ad97 | — |
| variable.other.member | #05ad97 | — |
| variable.parameter,meta.function.parameters,meta.function.parameters.js | #cc5200 | — |
| variable.other.readwrite,meta.delimiter.comma.js | #444 | — |
| keyword | #05ad97 | — |
| keyword.operator | #4d4d4d | — |
| keyword.operator.logical.python | #05ad97 | — |
| keyword.operator.in.js,keyword.operator.of.js | #05ad97 | — |
| storage | #cc4a33 | |
| storage.type | #ac0640 | — |
| entity.name.class,entity.name.type.class,entity.other.inherited-class | #05ad97 | — |
| entity.name.function,variable.function,meta.function-call.generic.python,support.function.any-method | #8d12ba | — |
| entity.name.tag | #0f8ebd | — |
| entity.other.attribute-name | #a15ebb | — |
| support.function | #c309b6 | |
| support.constant | #3396cc | |
| support.type, support.class | #3396cc | — |
| invalid | #cc4a33 | bold |
| invalid.deprecated | #c5074a | bold |
| token.info-token | #316bcd | — |
| token.warn-token | #cd9731 | — |
| token.error-token | #cd3131 | — |
| token.debug-token | #800080 | — |
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}!`;
}