XpyJs Black
Publisher: xpyjsThemes in package: 1
XpyJs Black is a pure black theme that reduces visual fatigue and highlights the workspace.
XpyJs Black is a pure black theme that reduces visual fatigue and highlights the workspace.
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 | #758575dd | italic |
| delimiter.bracket, delimiter, invalid.illegal.character-not-allowed-here.html, keyword.operator.rest, keyword.operator.spread, keyword.operator.type.annotation, keyword.operator.relational, keyword.operator.assignment, keyword.operator.type, meta.brace, meta.tag.block.any.html, meta.tag.inline.any.html, meta.tag.structure.input.void.html, meta.type.annotation, meta.embedded.block.github-actions-expression, storage.type.function.arrow, meta.objectliteral.ts, punctuation, punctuation.definition.string.begin.html.vue, punctuation.definition.string.end.html.vue | #444444 | — |
| constant, entity.name.constant, variable.language, meta.definition.variable | #00ffff | — |
| entity, entity.name | #a2ea3a | — |
| variable.parameter, variable.parameter.function | #dbd7cacc | bold |
| support.function | #82AAFF | — |
| entity.name.tag, tag.html | #2ab479 | — |
| entity.name.function | #25e735 | — |
| keyword, storage.type.class.jsdoc, punctuation.definition.template-expression | #6dd3a7 | — |
| storage.type, support.type.builtin | #eb266d | — |
| storage, constant.language.undefined, constant.language.null, constant.language.import-export-all.ts | #eb266d | — |
| constant.language.undefined, constant.language.null | #ce5b85 | italic bold |
| text.html.derivative, storage.modifier.package, storage.modifier.import, storage.type.java | #dbd7cacc | — |
| string, string punctuation.section.embedded source, attribute.value | #9bd2eb | — |
| punctuation.definition.string | #9bd2eb | — |
| punctuation.support.type.property-name | #ff9a3b | — |
| support | #c2ce55 | — |
| meta.object-literal.key, meta.object-literal.key.ts, meta.object-literal.key.js, support.type.property-name.yaml, meta.structure.dictionary.key.python, meta.mapping.key, property, meta.property-name, attribute.name, entity.name.tag.yaml | #ccc | — |
| support.type.property-name.json, support.type.property-name.json.comments | #c2ce55 | — |
| entity.name.tag.custom | #2e6fb9 | — |
| entity.other.attribute-name, invalid.deprecated.entity.other.attribute-name.html | #7c87b6 | italic |
| entity.other.attribute-name.class, entity.other.attribute-name.id | #a784db | — |
| variable, identifier | #c2bd2e | — |
| variable.parameter, variable.parameter.function, variable.parameter.function.python, variable.parameter.cs, variable.parameter.cpp, variable.parameter.rust, meta.arguments variable.parameter, meta.function.parameters variable.parameter, meta.lambda.parameters variable.parameter, meta.arrow.parameters variable.parameter, meta.function.parameter variable.parameter, meta.method.parameters variable.parameter | #93c598 | italic |
| support.type.primitive | #4ef7f7 | italic |
| entity.name.type | #5d66ee | — |
| namespace | #eb266d | — |
| keyword.operator, keyword.operator.assignment.compound, meta.var.expr.ts | #eb266d | — |
| invalid.broken | #eb266d | italic |
| invalid.deprecated | #eb266d | italic |
| invalid.illegal | #eb266d | italic |
| invalid.unimplemented | #eb266d | italic |
| carriage-return | #24292e | italic underline |
| message.error | #eb266d | — |
| string variable | #c98a7d | — |
| source.regexp, string.regexp | #c4704f | — |
| string.regexp.character-class, string.regexp constant.character.escape, string.regexp source.ruby.embedded, string.regexp string.regexp.arbitrary-repitition | #c98a7d | — |
| string.regexp constant.character.escape | #e6cc77 | — |
| keyword.operator.quantifier.regexp, constant.numeric, number | #cf6632 | — |
| keyword.other.unit | #cb7676 | — |
| constant.language.boolean, constant.language | #ff0e56 | — |
| meta.module-reference | #4d9375 | — |
| punctuation.definition.list.begin.markdown | #d4976c | — |
| markup.heading, markup.heading entity.name | #4d9375 | bold |
| markup.quote | #5d99a9 | — |
| markup.italic | #dbd7cacc | italic |
| markup.bold | #dbd7cacc | bold |
| markup.raw | #4d9375 | — |
| markup.deleted, meta.diff.header.from-file, punctuation.definition.deleted | #fdaeb7 | — |
| markup.inserted, meta.diff.header.to-file, punctuation.definition.inserted | #85e89d | — |
| markup.changed, punctuation.definition.changed | #ffab70 | — |
| markup.ignored, markup.untracked | #2f363d | — |
| meta.diff.range | #b392f0 | bold |
| meta.diff.header | #79b8ff | — |
| meta.separator | #79b8ff | bold |
| meta.output | #79b8ff | — |
| brackethighlighter.tag, brackethighlighter.curly, brackethighlighter.round, brackethighlighter.square, brackethighlighter.angle, brackethighlighter.quote | #d1d5da | — |
| brackethighlighter.unmatched | #fdaeb7 | — |
| constant.other.reference.link, string.other.link, punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown | #c98a7d | — |
| markup.underline.link.markdown, markup.underline.link.image.markdown | #dedcd590 | underline |
| type.identifier, constant.other.character-class.regexp | #6872ab | — |
| entity.other.attribute-name.html.vue | #80a665 | italic |
| invalid.illegal.unrecognized-tag.html | — | normal |
| entity.name.tag.css, entity.name.tag.less, entity.name.tag.custom.css, support.constant.property-value.css | #a18f3e | |
| entity.name.tag.scss, entity.name.tag.sass | #7fdbca | — |
| keyword.operator.comparison, keyword.control.flow.js, keyword.control.flow.ts, keyword.control.flow.tsx, keyword.control.ruby, keyword.control.module.ruby, keyword.control.class.ruby, keyword.control.def.ruby, keyword.control.loop.js, keyword.control.loop.ts, keyword.control.import.js, keyword.control.import.ts, keyword.control.import.tsx, keyword.control.from.js, keyword.control.from.ts, keyword.control.from.tsx, keyword.operator.instanceof.js, keyword.operator.expression.instanceof.ts, keyword.operator.expression.instanceof.tsx | #eb266d | italic bold |
| keyword.control.conditional.js, keyword.control.conditional.ts, keyword.control.switch.js, keyword.control.switch.ts | #dd5555 | italic |
| support.constant, keyword.other.special-method, keyword.other.new, keyword.other.debugger, keyword.control | #eb266d | italic |
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}!`;
}