Granny Bracelet
Publisher: Steven WienerThemes in package: 1
Inspired by a pretty garment
Inspired by a pretty garment
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 | #7b7b7b | italic |
| keyword, keyword.control, storage.type, keyword.operator.new | #c32750 | — |
| storage.modifier | #d9446b | italic |
| entity.name.function, meta.function-call, variable.function, support.function, keyword.other.special-method | #0C92BB | — |
| entity.name.method.js | #0eb0e1 | italic |
| string, string.quoted, constant.other.symbol, markup.inline.raw | #c49822 | — |
| string.regexp | #ddb13c | — |
| punctuation.definition.string | #99761a | — |
| variable, string constant.other.placeholder | #0C92BB | — |
| variable.parameter | #0eb0e1 | italic |
| variable.language | #ae2347 | italic |
| constant.numeric, constant.language, support.constant, keyword.other.unit | #603bd9 | italic |
| constant.character.escape | #c32750 | — |
| entity.name.type, entity.name.class, support.type, support.class | #0C92BB | — |
| entity.name.tag, keyword.control.at-rule | #c32750 | — |
| entity.other.attribute-name | #0C92BB | — |
| entity.other.attribute-name.class | #0C92BB | — |
| text.html.basic entity.other.attribute-name | #0C92BB | italic |
| support.type.property-name | #c8c8c8 | — |
| source.json meta.structure.dictionary.json support.type.property-name.json | #c49822 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #0C92BB | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #0C92BB | — |
| markup.heading, entity.name.section.markdown | #3fdf64 | bold |
| markup.bold | #c32750 | bold |
| markup.italic | #d9446b | italic |
| markup.underline.link, markup.underline.link.markdown | #0C92BB | underline |
| markup.inserted | #76ee00 | — |
| markup.deleted | #ff5370 | — |
| markup.changed | #ffee22 | — |
| invalid, invalid.illegal | #ff5370 | — |
| token.info-token | #0C92BB | — |
| token.warn-token | #cd9731 | — |
| token.error-token | #f44747 | — |
| token.debug-token | #603bd9 | — |
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}!`;
}