ccotton
Publisher: c-cotttonThemes 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 |
|---|---|---|
| punctuation.definition.dictionary.begin.json.comments, punctuation.definition.dictionary.end.json.comments, | #ffffff | — |
| punctuation.definition.array.begin.json.comments, punctuation.definition.array.end.json.comments | #ffffff | — |
| invalid.illegal.expected-dictionary-separator.json.comments, meta.structure.dictionary.json.comments, meta.structure.dictionary.value.json.comments,meta.structure.dictionary.json.comments, source.json.comments | #a7a7a7 | — |
| comment, string | #aaaaaa | — |
| support.function | #a3ee91 | — |
| support.type.property-name, support.type.property-name.json, | #ff85aa | — |
| support.type, punctuation.separator.comma.js | #bda2be | — |
| punctuation.definition.tag.html, punctuation.definition.tag.begin, punctuation.definition.tag.end | #bda2be | — |
| entity.name.tag | #bda2be | — |
| entity.other.attribute-name, entity.other.attribute-name.class.css | #ffed85 | — |
| punctuation.definition.string, punctuation.definition.variable, punctuation.definition.string, punctuation.definition.parameters, punctuation.definition.string, punctuation.definition.array | #757575 | — |
| punctuation.definition.string.begin.html, punctuation.definition.string.end.html | #757575 | — |
| entity.other.attribute-name.id.css, variable | #8aedff | — |
| support.type.property-name.css, entity.name.function.js | #398fff | — |
| string.quoted.single.js, meta.structure.dictionary, string.quoted.double.json | #05aecc | — |
| constant.numeric | #ffed85 | — |
| keyword.other.special-method | #7CAFC2 | — |
| keyword, variable.other.constant.js | #fc912d | — |
| string.quoted.double.html, string.quoted.double.handlebars | #ff5555 | — |
| meta.property-group support.constant.property-value.css, meta.property-value support.constant.property-value.css | #dbdbdb | — |
| support.constant.color.w3c-standard-color-name.css | #dbdbdb | — |
| keyword.operator | #c9d9f8 | — |
| text.html.derivative | #c9d9f8 | — |
| variable.parameter | #fc912d | — |
| storage.type | #c073ff | — |
| keyword.control.loop.js, keyword.control.conditional | #ff3482 | — |
| string.quoted.double.js | #ff85aa | — |
| constant.language, support.constant.math.js | #EAB780 | — |
| punctuation.section.property-list.begin.bracket.curly.css, punctuation.section.property-list.end.bracket.curly.css | #f1f1f1 | — |
| constant.other.color.rgb-value.hex.css, keyword.operator.gradient.css | #dbdbdb | — |
| entity.name.tag.css, meta.brace.round.js, punctuation.definition.string.begin.js, punctuation.definition.string.end.js | #f1f1f1 | — |
| variable.other.readwrite.js, string.quoted.double.css | #dbdbdb | — |
| punctuation.section.function.begin.bracket.round.css, punctuation.section.function.end.bracket.round.css | #f1f1f1 | — |
| punctuation.definition.block.js, punctuation.terminator.statement.js | #f1f1f1 | — |
| punctuation.separator.key-value.css, punctuation.terminator.rule.css, punctuation.separator.list.comma.css | #f1f1f1 | — |
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}!`;
}