Liquor Theme
Publisher: gen9009Themes 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 |
|---|---|---|
| comment.line.double-slash,comment.block.documentation,comment.block | #4f7e55c8 | |
| keyword.control | #9f8947 | — |
| keyword.control.import, keyword.control.from, keyword.control.export, support.type.object.module | #6a82a5 | — |
| variable.function | #af513a | — |
| variable.other | #c5a956 | — |
| variable.other.object | #c5a956 | — |
| variable.other.constant | #c5a956 | — |
| string | #9f8947 | — |
| entity.name.function | #ca7b5b | — |
| entity.name.function.member | #aa6c42 | — |
| entity.name.type | #6a82a5 | — |
| support.function.console | #af513a | — |
| storage | #8873b3 | — |
| storage.type.function.arrow | #f8d566 | — |
| entity.other.attribute-name.js,entity.other.attribute-name.ts,entity.other.attribute-name.jsx,entity.other.attribute-name.tsx,variable.parameter,variable.language.super | #80a1cb | — |
| support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx | #80a1cb | — |
| punctuation.definition.string | #80a1cb | — |
| entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class, entity.other.attribute-name.class, meta.attribute-selector.scss | #9f8947 | — |
| support.function.misc | #ca7b5b | — |
| support.type.property-name.css,meta.property-value.css,meta.property-name.css | #80a1cb | — |
| constant | #8873b3 | — |
| punctuation.definition.constant | #8873b3 | — |
| keyword.other.unit | #8873b3 | — |
| support.constant | #9F8947 | — |
| support.constant.property-value | #CA7B5B | — |
| variable.css,variable.scss,variable.less | #c5a956 | — |
| list.end.bracket.curly.scss,list.begin.bracket.curly.scss | #c5a956 | — |
| entity.name.tag | #6A82A5 | — |
| entity.other.attribute-name | #80a1cb | — |
| punctuation.separator,punctuation.attribute-shorthand | #6b6b6b | — |
| meta.attribute.directive.vue | #bababa | — |
| support.type.property-name.json | #6a82a5 | — |
| heading.1.markdown | #83b5f7 | — |
| heading.2.markdown | #80a1cb | — |
| heading.3.markdown | #6a82a5 | — |
| heading.4.markdown | #6a82a5 | — |
| heading.5.markdown | #6a82a5 | — |
| punctuation.definition.list.begin.markdown | #ccb25e | — |
| markup.inline.raw.string.markdown | #5e9177 | — |
| meta.paragraph.markdown | #aeaeae | — |
| source.ignore | #878686 | — |
| keyword.other | #8873b3 | — |
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}!`;
}