Red Planet Theme
Publisher: garizolaThemes in package: 1
Theme inspired by red planet
Theme inspired by red planet
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 | #676767 | — |
| string | #869985 | — |
| punctuation.definition.string | #869985 | — |
| punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php, punctuation.section.embedded | #869985 | — |
| variable.language, variable.language.this, variable.language.special, variable.language punctuation.definition.variable | #E8BF6A | — |
| constant.language | #E8BF6A | — |
| keyword, keyword.control, storage, storage.type | #896492 | — |
| entity.name.function, support.function | #69819E | — |
| variable, variable.other, punctuation.definition.variable | #C2B790 | — |
| variable.other.property, variable.object.property | #C2B790 | — |
| entity.name.type, entity.name.class, support.class | #B55242 | — |
| keyword.operator | #5B8390 | — |
| keyword.operator.ternary, keyword.operator.conditional | #C2B790 | — |
| punctuation, meta.brace, meta.delimiter, meta.bracket, punctuation.definition.parameters, punctuation.terminator, punctuation.separator | #B55242 | — |
| meta.array.literal string, meta.array string | #869985 | — |
| entity.name.tag | #D6BFB8 | — |
| entity.other.attribute-name | #B55242 | — |
| punctuation.section.scope, punctuation.section.scope.begin, punctuation.section.scope.end, punctuation.definition.block | #896492 | — |
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}!`;
}