Anthracite
Publisher: Matloob AltafThemes in package: 3
A neutral dark theme in three syntax weights: dusty hues, vivid hues, and tinted grays.
A neutral dark theme in three syntax weights: dusty hues, vivid hues, and tinted grays.
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, punctuation.definition.comment, string.comment | #6d7681 | italic |
| storage.type.class.jsdoc, entity.name.type.instance.jsdoc, variable.other.jsdoc, comment.block.documentation storage.type, comment.block.documentation variable | #9aa3ad | italic |
| keyword, keyword.control, keyword.other, storage, storage.type, storage.modifier, keyword.operator.new, keyword.operator.expression, keyword.operator.logical.python, keyword.operator.wordlike | #c39be8 | — |
| variable.language | #c39be8 | italic |
| entity.name.label, entity.name.lifetime, punctuation.definition.lifetime, storage.modifier.lifetime | #c39be8 | italic |
| keyword.operator, punctuation, meta.brace, meta.delimiter, storage.type.function.arrow, punctuation.definition.tag, punctuation.separator, punctuation.terminator, punctuation.accessor, punctuation.section | #9aa3ad | — |
| punctuation.definition.template-expression, punctuation.section.embedded, punctuation.definition.interpolation | #c39be8 | — |
| meta.template.expression, meta.embedded.line, meta.interpolation | #dfe3e8 | — |
| string, punctuation.definition.string, string.quoted, string.template | #8ecb8b | — |
| constant.character.escape, constant.character.entity, constant.character.format.placeholder, constant.other.placeholder, string.regexp, string.regexp punctuation.definition.string, constant.other.character-class, keyword.control.anchor.regexp, keyword.operator.quantifier.regexp, keyword.operator.or.regexp, keyword.operator.negation.regexp, punctuation.definition.group.regexp, punctuation.definition.character-class.regexp | #e08a8a | — |
| constant.numeric, constant.language, constant.character, constant.other, keyword.other.unit, support.constant, variable.other.constant, variable.other.enummember, entity.name.constant | #e6b46e | — |
| entity.name.function, support.function, variable.function, meta.function-call.generic, entity.name.command, keyword.other.special-method | #79b8f0 | — |
| punctuation.decorator, meta.decorator punctuation.decorator, meta.decorator entity.name.function, meta.decorator variable.other.readwrite, entity.name.function.decorator, punctuation.definition.decorator, storage.type.annotation, meta.annotation.identifier | #e9a47f | — |
| entity.name.type, entity.name.class, entity.name.struct, entity.name.enum, entity.name.interface, entity.name.namespace, entity.name.scope-resolution, entity.name.module, entity.name.package, entity.other.inherited-class, support.type, support.class, support.module, support.class.component, entity.other.attribute-name.class.css, entity.other.attribute-name.id.css | #e9a47f | — |
| variable, meta.definition.variable.name, support.variable, entity.name.variable, punctuation.definition.variable | #dfe3e8 | — |
| variable.parameter, entity.name.variable.parameter | #dfe3e8 | italic |
| variable.other.property, variable.other.object.property, variable.other.member, support.variable.property, meta.object-literal.key, meta.attribute.python, support.type.property-name, support.type.vendored.property-name, punctuation.support.type.property-name, entity.name.tag.yaml | #b6c9e0 | — |
| entity.name.tag | #79b8f0 | — |
| entity.other.attribute-name | #e6b46e | — |
| entity.other.attribute-name.pseudo-class, entity.other.attribute-name.pseudo-element | #c39be8 | — |
| invalid, invalid.illegal | #e57373 | — |
| invalid.deprecated | #e57373 | strikethrough |
| markup.heading, entity.name.section, punctuation.definition.heading | #e8eaed | bold |
| markup.bold, punctuation.definition.bold | #e8eaed | bold |
| markup.italic, punctuation.definition.italic | #dfe3e8 | italic |
| markup.bold markup.italic, markup.italic markup.bold | #e8eaed | bold italic |
| markup.strikethrough | #9aa3ad | strikethrough |
| markup.quote, punctuation.definition.quote | #9aa3ad | italic |
| punctuation.definition.list, punctuation.definition.list.begin.markdown | #c39be8 | — |
| markup.inline.raw, markup.raw.inline, markup.raw.block, punctuation.definition.raw | #d7d3cc | — |
| punctuation.definition.markdown, fenced_code.block.language | #9aa3ad | — |
| string.other.link.title, string.other.link.description | #79b8f0 | — |
| markup.underline.link | #79b8f0 | underline |
| constant.other.reference.link | #e6b46e | — |
| meta.separator.markdown, punctuation.definition.table, punctuation.separator.table | #9aa3ad | — |
| markup.inserted, punctuation.definition.inserted | #a3c3a1 | — |
| markup.deleted, punctuation.definition.deleted | #d68e8e | — |
| markup.changed, punctuation.definition.changed | #d3b489 | — |
| meta.diff.header, meta.diff.index, punctuation.definition.from-file, punctuation.definition.to-file | #9aa3ad | — |
| meta.diff.range, punctuation.definition.range.diff | #c39be8 | — |
| token.info-token | #9cb9d6 | — |
| token.warn-token | #d3b489 | — |
| token.error-token | #d68e8e | — |
| token.debug-token | #c39be8 | — |
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}!`;
}