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 |
|---|---|---|
| — | #080808 | — |
| comment | #5A525F | italic |
| constant | #811F24 | bold |
| entity | #BF4F24 | |
| keyword | #794938 | |
| storage | #A71D5D | italic |
| string | punctuation.definition.string | #0B6125 | |
| support | #691C97 | |
| variable | #234A97 | |
| punctuation.separator | #794938 | — |
| invalid.deprecated | #B52A1D | bold italic underline |
| invalid.illegal | #F8F8F8 | italic underline |
| string source | #080808 | |
| string constant | #696969 | bold |
| string variable | #234A97 | |
| string.regexp | #CF5628 | |
| string.regexp.character-class, string.regexp constant.character.escaped, string.regexp source.ruby.embedded, string.regexp string.regexp.arbitrary-repitition | #CF5628 | bold italic |
| string.regexp constant.character.escape | #811F24 | bold |
| text source | — | — |
| support.function | #693A17 | |
| support.constant | #B4371F | |
| support.variable | #234A97 | — |
| markup.list | #693A17 | — |
| markup.heading | markup.heading entity.name | #19356D | bold |
| markup.quote | #0B6125 | italic |
| markup.italic | #080808 | italic |
| markup.bold | #080808 | bold |
| markup.underline | #080808 | underline |
| markup.link | #234A97 | italic underline |
| markup.raw | #234A97 | |
| markup.deleted | #59140E | — |
| meta.separator | #19356D | bold |
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}!`;
}