Nightshade
Publisher: Winning SoftwareThemes in package: 1
A deep-purple dark theme with teal and pink accents, tuned for readable syntax highlighting across many languages.
A deep-purple dark theme with teal and pink accents, tuned for readable syntax highlighting across many languages.
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, comment.block.documentation, comment.block.documentation.phpdoc.php, comment.line, comment.block, string.comment | #797979 | — |
| keyword.other.phpdoc, storage.type.class.jsdoc, punctuation.definition.block.tag.jsdoc, comment keyword | #8aaea8 | — |
| punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php, storage.type.class, storage.modifier.extends, storage.modifier, keyword.other.use, keyword.other.namespace, keyword.control.declare, storage.type.const, storage.type.function, storage.type, storage.type.var, keyword.other.phpdoc | #e1b5f8 | — |
| keyword.other.type, support.type.primitive, support.type.builtin, entity.name.type.alias, meta.type.annotation entity.name.type | #00eaff | — |
| support.attribute.php, entity.name.function.decorator, meta.decorator punctuation.decorator, punctuation.decorator | #47c69e | — |
| punctuation.separator.colon.php, punctuation.separator, punctuation.terminator, punctuation.separator.key-value | #797979 | — |
| meta.attribute.php | #a66cab | — |
| meta.class.php, punctuation.definition.class | #83aab5 | — |
| support.other.namespace, entity.name.namespace | #6d8f89 | — |
| entity.name.type, entity.name.class, entity.other.inherited-class, support.class.php, support.class.builtin, support.class, support.type | #1ba891 | — |
| entity.name.function, entity.name.function.method, support.function, meta.function-call entity.name.function, variable.function | #08dde4 | — |
| keyword.control, keyword.other.new, keyword.operator.new, keyword.operator.expression, keyword.operator.logical, keyword.control.flow, keyword.control.import, keyword.control.from | #748bcf | — |
| keyword.operator, keyword.operator.assignment, keyword.operator.arithmetic, keyword.operator.comparison | #89b8c2 | — |
| variable.language.this, variable.language.self, variable.language.super, variable.language.special | #00d2b2 | — |
| string.quoted, string.quoted.single, string.quoted.double, string.quoted.triple, string.template, string.unquoted, punctuation.definition.string | #845195 | — |
| constant.character.escape, constant.other.placeholder | #00eaff | — |
| punctuation.definition.template-expression, punctuation.section.embedded | #748bcf | — |
| entity.name.variable.parameter, variable.parameter, variable.parameter.function-call | #00eaff | — |
| variable, variable.other, variable.other.readwrite, meta.definition.variable entity.name.function | #d6c7e8 | — |
| variable.other.property, variable.other.object.property, meta.object-literal.key, support.type.property-name | #9fd6c9 | — |
| variable.other.property.promoted-property.php, meta.function.parameter.promoted-property.php variable.other | #9fd6c9 | — |
| constant.numeric.decimal.php, constant.numeric, constant.numeric.integer, constant.numeric.float, constant.numeric.hex | #5b8cf0 | — |
| constant.other.php, constant.language, constant.language.boolean, constant.language.null, constant.language.undefined, support.constant, variable.other.constant | #9d86ff | — |
| entity.name.tag, punctuation.definition.tag | #748bcf | — |
| entity.other.attribute-name, entity.other.attribute-name.html, entity.other.attribute-name.jsx | #47c69e | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.id.css, entity.name.tag.css | #1ba891 | — |
| support.type.property-name.css, support.type.property-name.scss | #08dde4 | — |
| markup.heading, entity.name.section.markdown | #1ba891 | bold |
| markup.bold | #e1b5f8 | bold |
| markup.italic | #e2c9ea | italic |
| markup.underline.link, string.other.link.title.markdown | #08dde4 | — |
| markup.inline.raw, markup.fenced_code.block | #00d2b2 | — |
| support.type.property-name.json | #1ba891 | — |
| invalid, invalid.illegal | #ff5370 | — |
| storage.type.class.ts, storage.type.class.tsx, storage.type.interface.ts, storage.type.enum.ts, storage.type.type.ts, storage.type.namespace.ts, storage.type.function.ts, storage.type.function.arrow.ts, storage.type.ts, storage.type.js, storage.modifier.ts, storage.modifier.async.ts, keyword.control.export.ts, keyword.control.import.ts, keyword.control.as.ts, keyword.control.default.ts | #e1b5f8 | — |
| entity.name.type.class.ts, entity.name.type.class.tsx, entity.name.type.interface.ts, entity.name.type.alias.ts, entity.name.type.enum.ts, entity.name.type.module.ts, entity.name.type.ts, support.class.builtin.ts, support.type.builtin.ts | #1ba891 | — |
| support.type.primitive.ts, meta.type.annotation.ts entity.name.type, meta.type.parameters.ts entity.name.type, meta.return.type.ts entity.name.type, keyword.operator.type.annotation.ts | #00eaff | — |
| entity.name.function.ts, entity.name.function.tsx, meta.function-call.ts entity.name.function, support.function.dom.ts | #08dde4 | — |
| meta.decorator.ts, meta.decorator.tsx, entity.name.function.decorator.ts, punctuation.decorator.ts | #47c69e | — |
| constant.language.boolean.true.ts, constant.language.boolean.false.ts, constant.language.null.ts, constant.language.undefined.ts, constant.language.nan.ts, support.variable.property.ts | #9d86ff | — |
| meta.object-literal.key.ts, variable.object.property.ts, meta.definition.property.ts variable | #9fd6c9 | — |
| variable.other.readwrite.alias.ts, variable.other.readwrite.alias.tsx, meta.import variable.other.readwrite, meta.export variable.other.readwrite | #e1b5f8 | — |
| entity.name.tag.script.html.vue, entity.name.tag.template.html.vue, entity.name.tag.style.html.vue, text.html.vue-html entity.name.tag, entity.name.tag.other.html.vue | #748bcf | — |
| entity.other.attribute-name.html.vue, meta.directive.vue entity.other.attribute-name.html, punctuation.attribute-shorthand.bind.html.vue, punctuation.attribute-shorthand.event.html.vue, punctuation.separator.key-value.html.vue | #47c69e | — |
| punctuation.definition.interpolation.begin.html.vue, punctuation.definition.interpolation.end.html.vue | #748bcf | — |
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}!`;
}