Sprinkle Pack
Publisher: Kagan MamakThemes in package: 15
A VS Code extension containing multiple custom color themes, allowing users to choose their preferred theme.
A VS Code extension containing multiple custom color themes, allowing users to choose their preferred theme.
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 |
|---|---|---|
| support.variable | #FFCC5C | — |
| constant.language | #FFB347 | bold |
| meta.import, meta.import.ts, meta.import.js | #FFA07A | — |
| entity.name.module.js, entity.name.module.ts | #ECA7FF | — |
| meta.function | #A8E6CF | — |
| meta.enum | #FFD56E | — |
| keyword.control.flow | #FF6F69 | bold |
| meta.decorator, meta.decorator punctuation, entity.name.function.decorator | #FFA07A | — |
| meta.return-type | #6EC6CA | — |
| meta.arrow | #FFB347 | — |
| meta.embedded.block | #D6D6D6 | — |
| markup.inline.raw | #FFCC5C | italic |
| markup.inserted | #A8E6CF | italic |
| markup.deleted | #FF6F69 | italic |
| markup.list | #FFD56E | — |
| markup.underline | #FFA07A | underline |
| markup.strikethrough | #FF6F69 | strikethrough |
| constant.character.escape | #6EC6CA | bold |
| meta.annotation | #FFCC5C | — |
| storage.type.function.arrow | #FFB347 | — |
| keyword.other.unit | #FFD56E | — |
| comment, punctuation.definition.comment | #999999 | italic |
| string, constant.other.symbol | #A8E6CF | — |
| constant.numeric | #FFD56E | bold |
| constant.language.boolean, constant.language | #6EC6CA | bold |
| keyword, storage.type, storage.modifier | #FFA07A | — |
| keyword.operator | #FFB347 | — |
| variable, identifier, variable.language | #D6D6D6 | — |
| entity.name.function, support.function, meta.function-call | #A8E6CF | bold |
| variable.parameter | #FFB347 | — |
| entity.name.type, support.type, entity.name.class | #6EC6CA | — |
| punctuation | #BBBBBB | — |
| invalid, invalid.illegal | #FFFFFF | — |
| markup.heading | #FFCC5C | bold |
| markup.bold | #FFA07A | bold |
| markup.italic, markup.quote | #A6A9BB | italic |
| entity.name.tag, support.class.component | #6EC6CA | — |
| support.constant, constant.other | #C3A4FF | — |
| meta.object-literal.key | #FFD56E | — |
| support.type.property-name | #FFA07A | — |
| storage.class.js | #89A4E0 | — |
| entity.other.attribute-name | #ECA7FF | — |
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}!`;
}