Chromatic
Publisher: cakerayThemes in package: 5
A collection of harmonious themes meant for all day use: Canyon, Cosmos, Dune, Forest, Meadow
A collection of harmonious themes meant for all day use: Canyon, Cosmos, Dune, Forest, Meadow
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 |
|---|---|---|
| accent, entity.name.function.operator.cpp, entity.name.function.operator.member.cpp, entity.name.type.class.templated.cpp, entity.name.namespace.cpp, keyword, keyword.operator.logical.python, markup.bold.markdown, punctuation.definition.directive, storage, storage.type.class.python, storage.type.function.ts, storage.type.rust, storage.type.ts, storage.type.tsx, support.constant, token.info-token, token.storage, wikiword.xi | #A8305C | — |
| beginning.punctuation, block.scope, constant, control.elements, entity.name.section, entity.name.annotationMember, entity.other.attribute-name, function.brace, keyword.operator, keyword.control.new, keyword.control.ternary, markup, meta.body.function.definition.cpp, meta.definition, meta.function, meta.function-call, meta.interface, meta.method, meta.method-call, meta.require, meta.selector, punctuation, rgb-value, selector, source, storage.modifier.import, storage.modifier.reference.cpp, storage.type.annotation, storage.type.function, support.type.property-name, text, token.variable, variable | #3A4234 | — |
| comment, keyword.other.documentation, punctuation.definition.comment, punctuation.definition.block.tag.jsdoc, storage.type.class.jsdoc, source.embedded.ts, string.quoted.docstring | #6B7364 | italic |
| constant.language, constant.numeric, entity.global, entity.name.variable, import.storage.java, inline-color-decoration rgb-value, less rgb-value, markup.quote.markdown, string | #266666 | — |
| emphasis md, entity.name.function, entity.other.alias, markup.heading.setext, markup.quote.markdown, support.function.builtin.python, support.variable, token.package, variable.function | #6B4A9E | — |
| entity.name, entity.name.section.markdown, entity.other.inherited-class, function.parameter, meta.arguments, meta.property, meta.symbol, meta.object-literal.key, meta.scope, storage.type, support, token.debug-token | #1F5FA0 | — |
| invalid, markup.deleted.diff, token.error-token | #A64F58 | — |
| markup.changed.diff, markup.italic, todo, token.warn-token | #806A3F | — |
| markup.inserted.diff, markup.underline.link | #2D7A4F | — |
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}!`;
}