Novasolarized
Publisher: injtyThemes in package: 3
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, comment.line, comment.block, punctuation.definition.comment | #62717D | italic |
| string, string.quoted, string.template | #489D8F | — |
| constant.numeric | #A6D0D9 | — |
| keyword, keyword.control, keyword.operator.new, keyword.other | #D47D7D | — |
| keyword.control.flow, keyword.control.conditional, keyword.control.loop, keyword.control.trycatch, keyword.control.import, keyword.control.from, keyword.control.export | #D47D7D | — |
| storage.type, storage.modifier | #D47D7D | — |
| entity.name.function, meta.function-call, variable.function, support.function | #6D8FB7 | — |
| entity.name.type, entity.name.class, support.type, support.class, storage.type.class | #D59E7B | — |
| entity.name.tag, support.class.component | #D59E7B | — |
| entity.other.attribute-name, meta.tag.attributes | #C072AD | — |
| variable.other.property, support.type.property-name, meta.object-literal.key | #C072AD | — |
| variable, variable.other.readwrite, variable.other | #B5B3AD | — |
| variable.parameter | #B5B3AD | — |
| constant, constant.language, constant.other, variable.other.constant | #A296C0 | — |
| entity.name.type.class, meta.function.constructor | #A296C0 | — |
| keyword.operator, punctuation.accessor | #A296C0 | — |
| punctuation.definition.block, punctuation.section, meta.brace | #B5B3AD | — |
| entity.name.namespace, entity.name.module | #A296C0 | — |
| punctuation.definition.tag, punctuation.definition.tag.begin, punctuation.definition.tag.end | #D59E7B | — |
| source.css support.type.property-name, source.scss support.type.property-name, source.less support.type.property-name | #C072AD | — |
| support.constant.property-value.css, support.constant.property-value.scss | #B5B3AD | — |
| constant.numeric.css, keyword.other.unit.px.css, keyword.other.unit.em.css, keyword.other.unit.rem.css, keyword.other.unit.percentage.css | #A6D0D9 | — |
| entity.other.attribute-name.class.css | #D59E7B | — |
| entity.other.attribute-name.id.css | #6D8FB7 | — |
| support.type.property-name.json | #C072AD | — |
| markup.heading, markup.heading entity.name, punctuation.definition.heading.markdown | #D47D7D | bold |
| markup.bold | #D59E7B | bold |
| markup.italic | #A296C0 | italic |
| markup.inline.raw, markup.raw.block | #489D8F | — |
| string.other.link.title.markdown | #6D8FB7 | — |
| markup.underline.link | #A6D0D9 | underline |
| invalid, invalid.illegal | #AA464C | — |
| *url*, *link*, *uri* | — | underline |
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}!`;
}