darkercolor
Publisher: J. FeserThemes in package: 4
Dark colored theme with semantic highlighting and TextMate fallback for variables
Dark colored theme with semantic highlighting and TextMate fallback for variables
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 | #6b7280 | italic |
| keyword, storage.type, storage.modifier, keyword.control, keyword.operator.new, keyword.operator.sizeof, keyword.operator.delete, keyword.operator.typeof | #cccc00 | bold |
| string, string.quoted, string.template, string.interpolated | #22c55e | — |
| constant.character.escape, string.regexp | #34d399 | — |
| constant.numeric, constant.language.boolean, constant.language.null, constant.language.undefined | #06b6d4 | — |
| entity.name.class, entity.name.type.class, support.class, entity.other.inherited-class, meta.cast entity.name.type, storage.type.cs, storage.type.java, storage.type.cpp, entity.name.type, entity.name.type.template, support.type, variable.other.readwrite.member.cpp, entity.name.scope-resolution | #f59e0b | bold |
| entity.name.function, support.function, meta.function-call, meta.method-call, variable.function | #3b82f6 | — |
| entity.name.function.member, meta.method.java, meta.method.cpp, entity.name.function.method | #60a5fa | — |
| variable, variable.other.readwrite, variable.parameter, meta.definition.variable | #e5e7eb | — |
| variable.other.property, variable.other.member, entity.name.variable.field | #ef4444 | — |
| constant.language, constant.other, variable.other.constant, entity.name.constant, variable.other.enummember | #059669 | italic |
| keyword.operator, punctuation.operator, keyword.operator.arithmetic, keyword.operator.assignment, keyword.operator.comparison, keyword.operator.logical | #ff8533 | — |
| punctuation, punctuation.separator, punctuation.terminator, punctuation.definition | #9ca3af | — |
| punctuation.section.brackets, punctuation.section.braces, punctuation.section.parens, meta.brace.round, meta.brace.square, meta.brace.curly | #fbbf24 | — |
| storage.type.primitive.java, storage.type.built-in.primitive.cpp, storage.type.primitive.cpp, keyword.type.cs, support.type.primitive, storage.type.void, keyword.type.void | #f59e0b | bold |
| entity.name.namespace, entity.name.package, storage.modifier.package.java, storage.modifier.import.java | #c77dff | — |
| keyword.control.import, keyword.control.include, meta.import, meta.include | #ff1493 | — |
| entity.name.function.decorator, punctuation.decorator, storage.type.annotation.java | #cccc00 | — |
| entity.name.label | #ff00ff | italic |
| meta.preprocessor, keyword.control.directive, entity.name.function.preprocessor | #cccc00 | — |
| entity.name.type.template, storage.type.template, punctuation.definition.template-expression | #ff9800 | — |
| entity.name.type.parameter, storage.type.generic, punctuation.definition.typeparameters | #ff9800 | italic |
| variable.language.this, keyword.other.this, variable.language.self | #ff1493 | italic |
| storage.modifier.access, storage.modifier.java, storage.modifier.cpp | #cccc00 | — |
| keyword.control.trycatch, storage.type.java.exception | #ff3333 | — |
| storage.type.function.lambda, keyword.operator.lambda | #ffa726 | — |
| markup.heading, markup.heading.1, markup.heading.2, markup.heading.3, markup.heading.4, markup.heading.5, markup.heading.6, entity.name.section.markdown | #cccc00 | bold |
| markup.bold, punctuation.definition.bold.markdown | #f59e0b | bold |
| markup.italic, punctuation.definition.italic.markdown | #3b82f6 | italic |
| markup.strikethrough, punctuation.definition.strikethrough.markdown | #9ca3af | strikethrough |
| markup.inline.raw, markup.raw.inline.markdown | #ff6600 | |
| markup.fenced_code.block.markdown, markup.raw.block.markdown | #22c55e | — |
| fenced_code.block.language.markdown, markup.fenced_code.block.markdown punctuation.definition.markdown | #cccc00 | — |
| markup.underline.link.markdown, markup.underline.link.image.markdown | #06b6d4 | underline |
| string.other.link.title.markdown, string.other.link.description.markdown | #60a5fa | — |
| markup.underline.link.markdown, markup.underline.link.image.markdown | #06b6d4 | — |
| markup.list.unnumbered.markdown, markup.list.numbered.markdown, punctuation.definition.list.markdown | #ff8533 | — |
| markup.quote.markdown, punctuation.definition.quote.markdown | #a855f7 | italic |
| meta.separator.markdown | #cccc00 | bold |
| markup.table.markdown, punctuation.separator.table-cell.markdown, punctuation.section.table-header.markdown | #fbbf24 | — |
| text.html.markdown entity.name.tag, text.html.markdown punctuation.definition.tag | #ef4444 | — |
| text.html.markdown entity.other.attribute-name | #fbbf24 | — |
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}!`;
}