Tokyo Lights
Publisher: vadyapanThemes in package: 1
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 |
|---|---|---|
| entity.name.function.preprocessor, meta.preprocessor.macro, storage.modifier.import, storage.type.generic, variable.parameter, punctuation.section.class.begin, punctuation.section.class.end | #E0AF68 | — |
| punctuation | #89DDFF | — |
| invalid | — | — |
| comment | #565F89 | — |
| punctuation.definition.comment | #565F89 | — |
| string, string.quoted, punctuation.definition.string.begin, punctuation.definition.string.end | #9ECE6A | — |
| keyword.package, entity.name.type.package, keyword.control.import | #7DCFFF | — |
| constant.language, constant.numeric, support.variable.magic | #FF9E64 | — |
| string.regexp, constant.other.placeholder, support.other.escape.special.regexp, support.type.property-name.json | #0DB9D7 | — |
| constant.character | #BB9AF7 | — |
| constant.other | #fd971f | — |
| storage, support.constant, punctuation.section.class | #49e0fd | — |
| keyword.function | #BB9AF7 | — |
| keyword, keyword.type, support.class | #9D7CD8 | — |
| storage.type, support.type | #429AA7 | — |
| keyword.operator | #89DDFF | — |
| entity.name.type, entity.name.function.support.builtin | #0DB9D7 | — |
| entity.name.function, support.function, variable.function | #7AA2F7 | — |
| markup.bold | — | bold |
| markup.italic | — | italic |
| markup.strikethrough | — | strikethrough |
| markup.underline | — | underline |
| markup.quote | #565F89 | — |
| markup.inline, markup.raw.inline | #ae81ff | — |
| variable.other.property | #9ED0CE | — |
| constant.other.boolean.toml | #ae81ff | — |
| string.other.link.title.markdown, string.other.link.description.markdown | #49e0fd | — |
| beginning.punctuation.definition.list.markdown, punctuation.definition.list_item.markdown, punctuation.definition.list.markdown, punctuation.definition.heading.markdown, punctuation.definition.bold.markdown, punctuation.definition.italic.markdown, punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.bold.begin.markdown, punctuation.definition.bold.end.markdown, punctuation.definition.italic.begin.markdown, punctuation.definition.italic.end.markdown, punctuation.definition.heading.begin.markdown, punctuation.definition.heading.end.markdown, punctuation.definition.raw.begin.markdown, punctuation.definition.raw.end.markdown, punctuation.definition.metadata.markdown, punctuation.definition.raw.markdown, markup.underline.link.image.markdown, markup.underline.link.markdown | #565F89 | normal |
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}!`;
}