toybox
Publisher: plewgThemes in package: 1
Just a little soft guy. Based on Dracula.
Just a little soft guy. Based on Dracula.
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 |
|---|---|---|
| — | #F5F5F4 | — |
| meta.embedded, source.groovy.embedded, string meta.image.inline.markdown | #F5F5F4 | — |
| comment | #78716C | — |
| string | #E3D97E | — |
| punctuation.definition.template-expression, punctuation.section.embedded | #FE9BE2 | — |
| meta.template.expression | #F5F5F4 | — |
| constant.numeric | #AD8CFE | — |
| constant.language | #AD8CFE | — |
| constant.character, constant.other | #AD8CFE | — |
| variable | #F5F5F4 | |
| keyword | #FE9BE2 | — |
| storage | #FE9BE2 | |
| storage.type | #5EDFFF | italic |
| entity.name.type, entity.name.class, entity.name.namespace, entity.name.scope-resolution | #5BEF96 | underline |
| entity.other.inherited-class | #5BEF96 | italic underline |
| entity.name.function | #5BEF96 | |
| variable.parameter | #F9C265 | italic |
| entity.name.tag | #FE9BE2 | |
| entity.other.attribute-name | #5BEF96 | |
| support.function | #5EDFFF | |
| support.constant | #5EDFFF | |
| support.type, support.class | #5EDFFF | italic |
| support.other.variable | — | |
| invalid | #F44747 | |
| invalid.deprecated | #F44747 | — |
| meta.structure.dictionary.json string.quoted.double.json | #D6D3D1 | — |
| meta.diff, meta.diff.header | #78716C | — |
| markup.deleted | #FE9BE2 | — |
| markup.inserted | #5BEF96 | — |
| markup.changed | #E3D97E | — |
| constant.numeric.line-number.find-in-files - match | #AD8CFEA0 | — |
| entity.name.filename.find-in-files | #E3D97E | — |
| markup.quote | #FE9BE2 | — |
| markup.list | #E3D97E | — |
| markup.bold, markup.italic | #5EDFFF | — |
| markup.inline.raw | #F9C265 | |
| markup.heading | #5BEF96 | — |
| markup.heading.setext | #5BEF96 | bold |
| markup.heading.markdown | — | bold |
| markup.quote.markdown | #78716C | italic |
| markup.bold.markdown | — | bold |
| string.other.link.title.markdown,string.other.link.description.markdown | #AD8CFE | — |
| markup.underline.link.markdown,markup.underline.link.image.markdown | #E3D97E | — |
| markup.italic.markdown | — | italic |
| markup.strikethrough | — | strikethrough |
| markup.list.unnumbered.markdown, markup.list.numbered.markdown | #F5F5F4 | — |
| punctuation.definition.list.begin.markdown | #5BEF96 | — |
| token.info-token | #6796E6 | — |
| token.warn-token | #CD9731 | — |
| token.error-token | #F44747 | — |
| token.debug-token | #B267E6 | — |
| variable.language | #F9C265 | — |
| source.note variable.parameter | — | |
| source.note invalid | #FE9BE2 | bold underline |
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}!`;
}