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 |
|---|---|---|
| — | #E6E1DC | — |
| source | #E8E2DF | |
| comment | #8B8B8B | |
| keyword, storage | #B6C34D | |
| support.function | #D98339 | |
| entity.name | #E16C5B | |
| constant.numeric | #B49CDA | |
| variable.language, variable.other | #4DA6BD | |
| constant | #C29B7A | |
| variable.other.constant | #E06868 | |
| constant.language | #71BACC | |
| string | #B0CC66 | |
| variable.language | #DBD76B | |
| support.type | #6E9CBE | — |
| support.constant | #BBC94D | |
| storage | #E8BF6A | |
| invalid | #FFFFFF | — |
| constant.character.escaped, constant.character.escape, string source, string source.ruby | #3FC172 | |
| markup.inserted | #E6E1DC | — |
| markup.deleted | #E6E1DC | — |
| meta.diff.header, meta.separator.diff, meta.diff.index, meta.diff.range | — | — |
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}!`;
}