Work Shirt
Publisher: Brian BuieThemes in package: 1
A well-worn color theme built around semantic syntax highlighting, a limited palette, and a minimalist workbench.
A well-worn color theme built around semantic syntax highlighting, a limited palette, and a minimalist workbench.
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 |
|---|---|---|
| keyword, punctuation.definition.keyword, variable.language, variable.parameter.function.language.special, storage, storage.modifier | #9872C3 | — |
| keyword.operator, storage.type.function.arrow, punctuation.terminator, meta.delimiter.comma | #9872C3 | — |
| support.function.magic, support.variable, support.type.object.module, variable.other.predefined, string.regexp, constant.character.escape, constant.regexp, constant.other.date, constant.other.timestamp, support.type.primitive, support.type.builtin | #52BAB6 | — |
| support.constant.property-value.css, support.function.misc.css | #DFA465 | — |
| meta.function-call variable.other.readwrite | #B0ACBE | — |
| constant.other.object.key | #B0ACBE | — |
| support.type.property-name, entity.other.attribute-name, meta.definition.property, meta.section.configblock constant.other.object.key | #DE79B2 | — |
| constant, string.quoted, string.template, punctuation.definition.string, meta.property-value.css, keyword.other.unit | #B7B767 | — |
| variable.language.this | #DFA465 | — |
| entity.name.function, support.function | #5A9ED7 | — |
| variable.parameter, meta.function.parameters | #B0ACBE | italic |
| entity.name.tag, support.class.component.open, support.class.component.close, punctuation.definition.tag, meta.selector | #6EC979 | — |
| comment, storage.type.class.jsdoc, entity.name.type.instance.jsdoc | #546685 | italic |
| punctuation.separator | #9872C3 | — |
| meta.brace, punctuation.definition.arguments, punctuation.definition.entity, punctuation.definition.type, punctuation.section.scope | #B0ACBE | — |
| log.error | #D86E77 | — |
| log.warning | #B7B767 | — |
| log.info | #52BAB6 | — |
| log.debug | #546685 | — |
| log.constant | #B0ACBE | — |
| emphasis, markup.italic | — | italic |
| strong, markup.bold | — | bold |
| markup.inserted | #6EC979 | — |
| markup.deleted | #D86E77 | — |
| markup.error | #D86E77 | — |
| markup.changed | #B7B767 | — |
| markup.underline | — | underline |
| invalid | #D86E77 | underline italic |
| markup.heading | #DE79B2 | — |
| markup.inline.raw | #9872C3 | — |
| markup.underline.link, string.other.link.description, string.other.link.title | #5A9ED7 | — |
| markup.quote | #B7B767 | italic |
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}!`;
}