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.control, keyword.other, markup.bold.markdown, punctuation.definition.directive, storage, storage.modifier, storage.type.class.python, storage.type.function, storage.type.rust, storage.type.ts, storage.type.tsx, support.constant, token.info-token, token.storage, variable.language, wikiword.xi | #EB9FB1 | — |
| keyword.operator, punctuation.bracket, punctuation.definition, punctuation.section, punctuation.separator, punctuation.terminator, text | #B3A99D | — |
| beginning.punctuation, block.scope, constant, constant.character, constant.keyword, constant.other, control.elements, entity.name.section, entity.name.annotationMember, entity.other.attribute-name, function.brace, markup.italic, meta.body.function.definition.cpp, meta.definition.class, meta.definition.variable, meta.function, meta.function-call, meta.interface, meta.method, meta.method.java, meta.method-call, meta.require, meta.selector, punctuation.definition.string, punctuation.operator, punctuation.parenthesis, rgb-value, selector, source, support.type.property-name, support.type.vendored.property-name.css, token.variable, variable, variable.other, variable.parameter | #99BFBF | — |
| comment, keyword.other.documentation, punctuation.definition.comment, punctuation.definition.block.tag.jsdoc, storage.type.class.jsdoc, source.embedded.ts, string.quoted.docstring | #ABA29A | italic |
| constant.language, constant.numeric, markup.underline.link, meta.function.decorator.python, storage.type.annotation | #CCB37A | — |
| entity.global, entity.name.variable, import.storage.java, inline-color-decoration rgb-value, less rgb-value, meta.template, string | #E6A589 | — |
| emphasis md, entity.name.function, entity.other.alias, markup.quote.markdown, support.function.builtin.python, support.variable, token.package, variable.function | #C2B3FF | — |
| entity.name, entity.name.type, 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.class, support.function, support.module.node, support.other, support.token.decorator.python, support.type, token.debug-token | #85BFFF | — |
| invalid, invalid.broken, invalid.deprecated, invalid.illegal, invalid.unimplemented, markup.deleted.diff, token.error-token | #EB6259 | — |
| markup.changed.diff, todo, token.warn-token | #D99B75 | — |
| markup.inserted.diff | #569E75 | — |
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}!`;
}