Bag Dark
Publisher: Bag MediaThemes in package: 1
Dark color theme
Dark color theme
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 |
|---|---|---|
| meta.embedded, source.groovy.embedded | #D4D4D4 | — |
| emphasis | — | italic |
| strong | — | bold |
| header | #000080 | — |
| comment | #57A64A | — |
| constant.language | #569CD6 | — |
| constant.numeric | #B5CEA8 | — |
| constant.regexp | #646695 | — |
| entity.name.tag | #569CD6 | — |
| entity.name.tag.css | #D7BA7D | — |
| entity.other.attribute-name | #9CDCFE | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.class.mixin.css, entity.other.attribute-name.id.css, entity.other.attribute-name.parent-selector.css, entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css, source.css.less entity.other.attribute-name.id, entity.other.attribute-name.attribute.scss, entity.other.attribute-name.scss | #D7BA7D | — |
| invalid | #F44747 | — |
| markup.underline | — | underline |
| markup.bold | #569CD6 | bold |
| markup.heading | #569CD6 | bold |
| markup.italic | — | italic |
| markup.inserted | #B5CEA8 | — |
| markup.deleted | #D69D85 | — |
| markup.changed | #569CD6 | — |
| punctuation.definition.quote.begin.markdown | #6A9955 | — |
| punctuation.definition.list.begin.markdown | #6796E6 | — |
| markup.inline.raw | #D69D85 | — |
| punctuation.definition.tag | #808080 | — |
| meta.preprocessor | #569CD6 | — |
| meta.preprocessor.string | #D69D85 | — |
| meta.preprocessor.numeric | #B5CEA8 | — |
| meta.structure.dictionary.key.python | #9CDCFE | — |
| meta.diff.header | #569CD6 | — |
| storage | #569CD6 | — |
| storage.modifier | #569CD6 | — |
| string | #D69D85 | — |
| string.tag | #D69D85 | — |
| string.value | #D69D85 | — |
| string.regexp | #D16969 | — |
| punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded | #569CD6 | — |
| meta.template.expression | #D4D4D4 | — |
| support.type.vendored.property-name, support.type.property-name, variable.css, variable.scss, variable.other.less, source.coffee.embedded | #9CDCFE | — |
| keyword | #569CD6 | — |
| keyword.operator | #B4B4B4 | — |
| keyword.operator.new, keyword.operator.expression, keyword.operator.cast, keyword.operator.sizeof, keyword.operator.instanceof, keyword.operator.logical.python | #569CD6 | — |
| keyword.other.unit | #B5CEA8 | — |
| punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php | #569CD6 | — |
| support.function.git-rebase | #9CDCFE | — |
| constant.sha.git-rebase | #B5CEA8 | — |
| storage.modifier.import.java, variable.language.wildcard.java, storage.modifier.package.java | #D4D4D4 | — |
| variable.language | #569CD6 | — |
| entity.name | #C8C8C8 | — |
| keyword.control.directive | #9B9B9B | — |
| variable | #C8C8C8 | — |
| entity.name.function | #C8C8C8 | — |
| entity.name.function.operator | #B4B4B4 | — |
| entity.name.function.preprocessor | #BD63C5 | — |
| entity.name.label | #C8C8C8 | — |
| entity.name.namespace | #FFFFFF | — |
| entity.name.type, entity.name.class | #4EC9B0 | — |
| entity.name.operator.custom-literal | #DADADA | — |
| entity.name.operator.custom-literal.number | #B5CEA8 | — |
| entity.name.operator.custom-literal.string | #D69D85 | — |
| keyword.operator.new, keyword.operator.delete | #569CD6 | — |
| variable.other.enummember | #B8D7A3 | — |
| variable.other.property | #DADADA | — |
| variable.parameter | #7F7F7F | — |
| comment, comment.block | — | italic |
| keyword - keyword.operator | #999999 | — |
| storage | #999999 | — |
| punctuation.separator.pointer-access.c, punctuation.separator.dot-access.c | #D1C452 | — |
| meta.block.c | #D9E289 | — |
| variable.other.property, entity.name.namespace.rust, punctuation.terminator.statement.c | #FFFFFF | — |
| entity.name.function, meta.member.access.python | #80CC00 | — |
| variable.parameter, entity.name.variable.parameter, meta.function-call.arguments.python | #708090 | — |
| variable.other.object.js.jsx, variable.other.object.ts, variable.other.object.tsx | #708090 | — |
| variable.other.constant | #728BA3 | — |
| entity.name.variable.local, variable.other.local, variable.other.rust, string.key.json5, meta.indexed-name.python | #66CDFF | — |
| keyword, punctuation.definition.typeparameters, punctuation.separator.delimiter.c | #676767 | — |
| entity.name.type | #FFAA48 | — |
| entity.name.function.preprocessor, entity.name.function.macro.rust | #DDDD4F | — |
| entity.name.type.class.js.jsx, entity.name.type.class.ts, entity.name.type.class.tsx | #FFAA48 | — |
| support.class.component.js.jsx, support.class.component.ts, support.class.component.tsx | #D68427 | — |
| variable.other.readwrite, meta.use.rust, meta.interpolation.rust | #87AFD4 | — |
| entity.other.inherited-class.js.jsx, entity.other.inherited-class.ts, entity.other.inherited-class.tsx | #FFAA48 | — |
| variable.other.readwrite.alias.js.jsx, variable.other.readwrite.alias.ts, variable.other.readwrite.alias.tsx | #D68427 | — |
| meta.object.member | #DDDDDD | — |
| constant.other.caps.rust, variable.other.global | #E0727B | bold |
| keyword.control.conditional.js, keyword.control.conditional.ts, keyword.control.conditional.tsx, keyword.control.flow.js, keyword.control.flow.ts, keyword.control.flow.tsx, keyword.control.rust | #5F5C57 | bold |
| storage.type.js, storage.type.ts, storage.type.tsx | #446BD6 | bold |
| variable.language.this | #6285E4 | bold italic |
| constant.language.null, constant.other.placeholder | #EED025 | bold italic |
| constant.language.boolean.false, keyword.operator.namespace.rust, constant.other.caps.python | #EE4D25 | bold italic |
| constant.language.boolean.true | #75EE25 | bold italic |
| variable.other.readwrite.js, variable.other.readwrite.ts, variable.other.readwrite.tsx | #87AFD4 | — |
| variable.other.object.js, variable.other.object.ts, variable.other.object.tsx | #87AFD4 | — |
| support.class.builtin.js, support.class.builtin.ts, support.class.builtin.tsx, constant.character.escape, meta.attribute.rust | #C23DA5 | bold italic |
| support.variable.property.js, support.variable.property.ts, support.variable.property.tsx, variable.other.object.property, entity.name.variable.property, punctuation.definition.interpolation, punctuation.parenthesis | #FFFFFF | — |
| support.constant | #C23DA5 | bold italic |
| keyword.operator | #919191 | — |
| support.function, support.type, constant.other.placeholder | #E1FF37 | — |
| token.info-token | #6796E6 | — |
| token.warn-token | #CD9731 | — |
| token.error-token | #F44747 | — |
| token.debug-token | #B267E6 | — |
| storage.modifier | #999999 | — |
| entity.name.namespace | #FFFFFF | — |
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}!`;
}