Nightstorm
Publisher: ninlithThemes in package: 5
A theme utilizing the Oklab color space.
A theme utilizing the Oklab color space.
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 |
|---|---|---|
| variable, constant, punctuation, keyword.operator, storage.type.function.arrow | #bbbbbb | — |
| comment, punctuation.definition.comment, punctuation.terminator.statement.js, punctuation.terminator.statement.ts | #808080 | — |
| token.error-token, invalid | #cc8080 | — |
| keyword, keyword.operator.logical.python, storage, punctuation.definition.directive, punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php, meta.fstring.python constant.character.format.placeholder.other.python, constant.character.escape, support.other.escape.special.regexp, constant.other.character-class.regexp, punctuation.definition.keyword, punctuation.definition.markdown, punctuation.definition.raw.markdown, punctuation.definition.bold.markdown, punctuation.definition.italic.markdown, punctuation.definition.list.begin.markdown, punctuation.definition.heading.markdown, punctuation.definition.quote.begin.markdown | #c98568 | |
| #bf8d55 | — | |
| token.warn-token, constant.language, support.variable.magic, variable.other.global.php, variable.other.global.php punctuation, meta.tag.other.unrecognized.html.derivative punctuation.definition.tag, meta.tag.other.unrecognized.html.derivative entity.name.tag, storage.type.annotation, punctuation.definition.annotation | #ad9650 | — |
| constant.numeric, constant.other.color.rgb-value.hex.css, punctuation.definition.constant.css | #959f59 | — |
| string, punctuation.definition.string, markup.inline.raw, markup.quote, keyword.other.unit, constant.character.set.regexp, constant.other.character-class.set.regexp, constant.other.character-class.range.regexp | #79a76e | — |
| comment.block.documentation storage.type, keyword.other.phpdoc, punctuation.definition.block.tag.jsdoc, keyword.other.phpdoc.php, meta.tag.custom entity.name.tag, meta.tag.custom punctuation.definition.tag, support.type, storage.type.php, keyword.other.type, source.go storage.type, entity.name.type, storage.type.built-in, source.cs keyword.type | #5bab88 | — |
| meta.function-call.generic, meta.function-call entity.name.function, meta.function-call support.function.magic, meta.method-call entity.name.function, entity.name.function.call, entity.name.function.member, support.function | #45aba3 | — |
| entity.name.tag, punctuation.definition.tag, source.css entity.other.attribute-name, meta.property-name.css, entity.other.attribute-name.id punctuation.definition.entity, meta.attribute.php, support.type.property-name.table.toml, punctuation.definition.table.toml | #45a8ba | |
| entity.name.class, entity.name.function, entity.name.type.class, support.function.magic, support.function.constructor, entity.name.function.decorator, meta.function.decorator support.type, punctuation.definition.decorator, punctuation.decorator, meta.decorator, meta.decorator meta.function-call entity.name.function, entity.other.inherited-class, meta.class.inheritance.python punctuation.separator.period.python, string.regexp punctuation.parenthesis, punctuation.definition.group.regexp, entity.name.tag.backreference.regexp, keyword.other.back-reference.regexp | #5aa1cb | |
| string.other.link, string.other.link.description.title.markdown punctuation.definition.string , markup.underline.link | #5aa1cb | underline |
| token.info-token | #7599d3 | |
| source.css support.constant, variable.language.special.self, variable.parameter.function.language.special.self, variable.language.special.cls, variable.parameter.function.language.special.cls, variable.language.this, variable.language.self, variable.language.cls, variable.language.this punctuation | #9190d1 | — |
| #a888c5 | ||
| token.debug-token, meta.attribute, entity.name.tag.yaml, fenced_code, entity.name.type.module, variable.other.property, variable.other.object.property, support.type.property-name, support.type.property-name.toml, support.type.vendored.property-name, support.variable.property | #bb82b2 | |
| markup.heading | #bb82b2 | italic |
| keyword.codetag.notation | #c77f9a | |
| markup.italic, variable.parameter.function, variable.parameter.function-call, variable.parameter.class, variable.parameter.class-call | — | italic |
| markup.bold | — | bold |
| markup.strikethrough | — | strikethrough |
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}!`;
}