Tropical Swirl
Publisher: tropical-swirlThemes in package: 1
Dark theme for epic adventures.
Dark theme for epic adventures.
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 |
|---|---|---|
| comment, punctuation.definition.comment | #72828c | — |
| constant | #969DC7 | — |
| constant.character.escape | #969DC7 | — |
| constant.regexp | #9aa1ac | — |
| constant.numeric, constant.language | #969DC7 | — |
| entity.name | #b19db9 | — |
| entity.name.namespace | #d4ba71 | — |
| entity.name.type | #d4ba71 | — |
| entity.other.attribute-name.pseudo-element | #b19db9 | — |
| entity.other.attribute-name.class.css | #A5B4BD | — |
| entity.name.section, entity.name.tag | #8d9ff6 | — |
| entity.other.attribute-name, entity.other.inherited-class | #9aa1ac | — |
| invalid | #e66c6c | — |
| invalid.deprecated | #72828c | — |
| keyword | #ae8ac7 | — |
| keyword.operator | #9aa1ac | — |
| keyword.operator.new | #AE8AC7 | — |
| markup.changed | #8D9FF6 | — |
| markup.deleted | #72828c | — |
| markup.inserted | #969DC7 | — |
| markup.heading | #8D9FF6 | — |
| markup.bold.markdown | #969DC7 | bold |
| markup.italic.markdown | #969DC7 | italic |
| markup.inline.raw.string.markdown | #2b9eba | — |
| meta.diff.range | #969DC7 | — |
| meta.function-call.generic | #2b9eba | — |
| meta.property-name.css | #a5b4bd | — |
| meta.property-value.css | #969DC7 | — |
| meta.tag, meta.brace | #a5b4bd | — |
| meta.import, meta.export | #8D9FF6 | — |
| punctuation.accessor | #a5b4bd | — |
| punctuation.definition.tag | #a5b4bd | — |
| punctuation.definition.heading.markdown | #8D9FF6 | — |
| punctuation.separator.key-value | #9aa1ac | — |
| source.css punctuation, source.sass punctuation, source.scss punctuation, source.less punctuation, punctuation.definition.keyword.css | #ae8ac7 | — |
| storage.type, storage.modifier | #ae8ac7 | — |
| string | #57c175 | — |
| support | #8D9FF6 | — |
| support.class | #d4ba71 | — |
| support.constant | #969DC7 | — |
| support.function | #2b9eba | — |
| support.type.property-name | #a5b4bd | — |
| support.type.property-name.json punctuation | #8D9FF6 | — |
| support.constant.property-value | #969DC7 | — |
| support.type.object.module | #2b9eba | — |
| support.type.property-name.json | #8D9FF6 | — |
| source.ts support.type, source.tsx support.type | #d4ba71 | — |
| variable | #8D9FF6 | — |
| variable.parameter | #8D9FF6 | — |
| variable.other.constant | #d4ba71 | — |
| variable.language.this, variable.other.object | #d4ba71 | — |
| variable.other, variable.language, variable.function, variable.argument | #8D9FF6 | — |
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}!`;
}