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 |
|---|---|---|
| — | #FFFFFF | — |
| comment | #666C68 | |
| storage, support.type | #C23B00 | — |
| string.unquoted.embedded, text source, string.unquoted | #FFFFFF | — |
| constant.character.escaped, string source - string.unquoted.embedded, string string source | #E9470000 | — |
| string - string source, string source string, meta.scope.heredoc | #C23800 | |
| constant.numeric | #E98800 | — |
| variable.language, variable.other | #648BD2 | |
| constant | #E98800 | — |
| other.preprocessor | #A8B3AB | |
| entity.name.preprocessor | #A8B3AB | |
| entity.name.function, keyword.operator, keyword.other.name-of-parameter | #A8B3AB | |
| entity.name.class | #9A2F00 | |
| variable.parameter | #648BD2 | |
| storage.type.method | #666C68 | |
| keyword, storage.type.function.php | #A39E64 | |
| invalid | #FFFFFF | — |
| invalid.trailing-whitespace | #000000 | — |
| support.function | #588E60 | |
| support.class, support.type, entity.name | #5778B6 | |
| support.constant | #C87500 | — |
| support.other.variable | #5879B7 | |
| declaration.xml-processing | #68685B | |
| declaration.doctype | #888888 | |
| declaration.doctype.DTD | #888888 | |
| declaration.tag | #A65EFF | |
| entity.name.tag | #A65EFF | — |
| entity.other.attribute-name | #909993 | |
| punctuation | #90999380 | — |
| entity.other.inherited-class | #7642B7 | |
| meta.scope.changed-files.svn, markup.inserted.svn, markup.changed.svn, markup.deleted.svn | #FFFFFF | |
| meta.section | — | — |
| meta.section meta.section | — | — |
| meta.section meta.section meta.section | — | — |
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}!`;
}