Charson Theme
Publisher: Richson SimbabureThemes in package: 2
Beautiful dark themes with inline diagnostics, semantic highlighting, and modern UI - Charson Dark & Charson Ember
Beautiful dark themes with inline diagnostics, semantic highlighting, and modern UI - Charson Dark & Charson Ember
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 |
|---|---|---|
| Default text | #93a1a1 | — |
| comment, punctuation.definition.comment | #586e75 | italic |
| string, string.quoted, string.template, punctuation.definition.string | #b58900 | — |
| string.quoted.docstring, string.documentation | #2aa198 | — |
| string.template meta.embedded, punctuation.definition.template-expression, meta.template.expression | #cb4b16 | — |
| constant.numeric | #6c71c4 | — |
| constant.language, constant.character, constant.other | #cb4b16 | — |
| constant.language.boolean, constant.language.null, constant.language.undefined | #cb4b16 | — |
| variable, variable.other | #93a1a1 | — |
| variable.language, variable.language.this, variable.language.self | #cb4b16 | italic |
| variable.other.property, variable.other.object.property | #2aa198 | — |
| variable.other.constant | #93a1a1 | — |
| variable.parameter, meta.function.parameters variable, meta.parameters variable | #839496 | italic |
| keyword | #6c71c4 | bold |
| keyword.control, keyword.control.flow, keyword.control.conditional, keyword.control.loop | #6c71c4 | bold |
| keyword.control.return | #6c71c4 | bold |
| keyword.control.import, keyword.control.export, keyword.control.from, keyword.control.as | #6c71c4 | bold |
| keyword.operator | #859900 | — |
| keyword.operator.logical, keyword.operator.comparison, keyword.operator.relational | #859900 | — |
| keyword.operator.assignment | #859900 | — |
| keyword.operator.new | #859900 | italic |
| storage | #859900 | — |
| storage.type, storage.type.function, storage.type.class | #6c71c4 | bold italic |
| storage.modifier | #859900 | italic |
| entity.name.function, meta.function entity.name.function | #cb4b16 | bold |
| meta.function-call, support.function, meta.function-call entity.name.function | #cb4b16 | bold |
| meta.method-call entity.name.function, entity.name.function.member | #cb4b16 | — |
| support.function.builtin, support.function.console | #cb4b16 | — |
| entity.name.type, support.type | #268bd2 | italic |
| support.type.primitive, storage.type.primitive | #268bd2 | italic |
| entity.name.class, support.class, entity.other.inherited-class | #268bd2 | italic |
| entity.name.type.interface | #268bd2 | italic |
| meta.type.annotation entity.name.type, meta.type entity.name.type | #268bd2 | italic |
| entity.name.tag | #b58900 | — |
| punctuation.definition.tag | #cb4b16 | — |
| entity.other.attribute-name | #268bd2 | — |
| support.class.component, entity.name.tag support.class.component | #b58900 | — |
| meta.object-literal.key, support.type.property-name, string.unquoted | #2aa198 | — |
| support.type.property-name.json | #2aa198 | — |
| meta.brace.curly, meta.brace.round, meta.brace.square, punctuation.section | #839496 | — |
| punctuation.definition.block | #839496 | — |
| punctuation.separator, punctuation.accessor, meta.delimiter | #859900 | — |
| punctuation.terminator | #93a1a1 | — |
| string.regexp | #2aa198 | — |
| constant.character.escape | #cb4b16 | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.id.css | #b58900 | — |
| support.type.property-name.css, meta.property-name.css | #2aa198 | — |
| support.constant.property-value.css, meta.property-value.css | #93a1a1 | — |
| keyword.other.unit.css, constant.numeric.css | #6c71c4 | — |
| constant.other.color.css, support.constant.color.css | #d33682 | — |
| entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css | #cb4b16 | — |
| markup.heading, entity.name.section | #cb4b16 | bold |
| markup.heading.1, heading.1.markdown entity.name | #d33682 | bold |
| markup.heading.2, heading.2.markdown entity.name | #6c71c4 | bold |
| markup.bold | — | bold |
| markup.italic | — | italic |
| markup.underline, markup.underline.link | #268bd2 | underline |
| markup.quote | #2aa198 | italic |
| markup.inline.raw, markup.fenced_code.block, markup.raw.inline | #b58900 | — |
| markup.list, beginning.punctuation.definition.list | #268bd2 | — |
| invalid | #dc322f | — |
| invalid.deprecated | #d33682 | — |
| markup.inserted, diff.inserted | #859900 | — |
| markup.deleted, diff.deleted | #dc322f | — |
| markup.changed, diff.changed | #b58900 | — |
| entity.name.function.decorator.python, meta.function.decorator.python | #cb4b16 | — |
| variable.parameter.function.language.special.self.python | #cb4b16 | italic |
| variable.other.readwrite.ts, variable.other.readwrite.tsx | #b58900 | — |
| storage.type.type.ts, storage.type.type.tsx, storage.type.interface.ts, storage.type.interface.tsx | #859900 | italic |
| keyword.control.return.ts, keyword.control.return.tsx, keyword.control.return.js, keyword.control.return.jsx | #859900 | italic |
| keyword.control.js, keyword.control.ts, keyword.control.jsx, keyword.control.tsx | #859900 | italic |
| variable.other.readwrite.js, variable.other.readwrite.jsx | #b58900 | — |
| entity.name.function.macro.rust, meta.macro.rust | #cb4b16 | — |
| entity.name.package.go | #6c71c4 | — |
| variable.other.normal.shell, variable.other.positional.shell | #2aa198 | — |
| entity.name.tag.yaml | #2aa198 | — |
| support.type.property-name.toml | #2aa198 | — |
| entity.name.section.toml | #268bd2 | — |
| punctuation.definition.tag.begin.html.vue, punctuation.definition.tag.end.html.vue | #cb4b16 | — |
| markup.hint, editorHint | #2aa198 | — |
| markup.info, editorInfo | #268bd2 | — |
| markup.warning, editorWarning | #b58900 | — |
| markup.error, editorError | #dc322f | — |
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}!`;
}