sage-theme
Publisher: nashpattyThemes in package: 2
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.terminator,constant.character.escape,punctuation.quasi.element | #87AFD7 | — |
| entity.name,support.type.property-name.json | #8787AF | — |
| variable.other,string.unquoted.argument.shell,storage.type.object,storage.type.java,constant.other.option | #BCBCBC | — |
| entity.name.function,support.function,keyword.control.twig | #FFFFAF | — |
| meta.embedded, source.groovy.embedded, string meta.image.inline.markdown, variable.legacy.builtin.python | #BCBCBC | — |
| emphasis | — | italic |
| strong | — | bold |
| comment | #6C6C6C | — |
| comment.block | #6C6C6C | — |
| constant.language | #87AFD7 | — |
| constant.numeric, variable.other.enummember, keyword.operator.plus.exponent, keyword.operator.minus.exponent | #FF8700 | — |
| constant.regexp | #AF5F5F | — |
| entity.name.tag | #87AFD7 | — |
| entity.name.tag.css, entity.name.tag.less | #87AFD7 | — |
| entity.other.attribute-name | #8787AF | — |
| entity.other.attribute-name.class.css, source.css entity.other.attribute-name.class, entity.other.attribute-name.id.css, entity.other.attribute-name.parent-selector.css, entity.other.attribute-name.parent.less, source.css entity.other.attribute-name.pseudo-class, entity.other.attribute-name.pseudo-element.css, source.css.less entity.other.attribute-name.id, entity.other.attribute-name.scss | #87AFD7 | — |
| invalid | #B30000 | — |
| markup.underline | — | underline |
| markup.bold | #87AFD7 | bold |
| markup.heading | #87AFD7 | bold |
| markup.italic | — | italic |
| markup.strikethrough | — | strikethrough |
| markup.inserted | #FF8700 | — |
| markup.deleted | #87AF87 | — |
| markup.changed | #87AFD7 | — |
| punctuation.definition.quote.begin.markdown | #87AF87 | — |
| punctuation.definition.list.begin.markdown | #FFFFAF | — |
| markup.inline.raw | #87AF87 | — |
| punctuation.definition.tag | #999999 | — |
| meta.preprocessor, entity.name.function.preprocessor | #87AFD7 | — |
| meta.preprocessor.string | #87AF87 | — |
| meta.preprocessor.numeric | #FF8700 | — |
| meta.diff.header | #87AFD7 | — |
| storage | #87AFD7 | — |
| storage.type | #87AFD7 | — |
| storage.modifier, keyword.operator.noexcept | #87AFD7 | — |
| string, meta.embedded.assembly | #87AF87 | — |
| string.tag | #87AF87 | — |
| string.value | #87AF87 | — |
| string.regexp | #87AF87 | — |
| punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded | #87AFD7 | — |
| meta.template.expression | #BCBCBC | — |
| support.type.vendored.property-name, support.type.property-name, source.css variable, source.coffee.embedded | #BCBCBC | — |
| keyword | #87AFD7 | — |
| keyword.control | #87AFD7 | — |
| keyword.operator | #BCBCBC | — |
| keyword.operator.new, keyword.operator.expression, keyword.operator.cast, keyword.operator.sizeof, keyword.operator.alignof, keyword.operator.typeid, keyword.operator.alignas, keyword.operator.instanceof, keyword.operator.logical.python, keyword.operator.wordlike | #87AFD7 | — |
| keyword.other.unit | #FF8700 | — |
| punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php | #87AFD7 | — |
| constant.sha.git-rebase | #FF8700 | — |
| storage.modifier.import.java, variable.language.wildcard.java, storage.modifier.package.java | #BCBCBC | — |
| variable.language | #87AFD7 | — |
| support.constant.property-value, keyword.control.at-rule | #8787AF | — |
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}!`;
}