MultiTheme
Publisher: Arturo ArevaloThemes in package: 336
A collection of themes ported from TextMate
A collection of themes ported from TextMate
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #9015f3 | — |
| comment | #ffffffff | |
| string | #ffffffff | |
| constant.numeric | #ff00ffff | — |
| constant.language | #ffffc0ff | |
| constant.character, constant.other | #ffffffff | — |
| variable.language, variable.other | #ffa000ff | |
| keyword, support.constant.property-value, constant.other.color | #ff00ffff | bold |
| keyword.other.unit | #ffffffff | — |
| keyword.operator | #ffffffff | — |
| storage | #46f14a | bold |
| entity.name.class | #ffff00ff | bold |
| entity.other.inherited-class | #ffffffff | |
| entity.name.function | #00ffffff | bold |
| variable.parameter | — | — |
| entity.name.tag | #ffffffff | |
| constant.character.entity | #ffffffff | — |
| support.class.js | #ffffffff | — |
| entity.other.attribute-name | #ffffffff | |
| meta.selector.css, entity.name.tag.css, entity.other.attribute-name.id.css, entity.other.attribute-name.class.css | #23ac2e | |
| meta.property-name.css | #ffffffff | — |
| support.function | #0fa70d | — |
| support.constant | — | — |
| support.type, support.class | — | — |
| support.other.variable | — | |
| invalid | — | — |
| punctuation.section.embedded | #a000ffff | |
| punctuation.definition.tag | #ffffffff | |
| constant.other.color.rgb-value.css, support.constant.property-value.css | #ffffffff | — |
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}!`;
}