Noctokai
Publisher: farigabThemes in package: 8
A low-brightness dark theme inspired by Monokai and Dracula. Designed for long coding sessions with reduced eye strain.
A low-brightness dark theme inspired by Monokai and Dracula. Designed for long coding sessions with reduced eye strain.
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, comment.line, comment.block, comment.block.documentation | #75715e | italic |
| comment.block.documentation storage.type.class.jsdoc, comment.block.documentation punctuation.definition.block.tag.jsdoc, comment.block.documentation entity.name.type.instance.jsdoc | #66d9ef | italic |
| string, string.quoted, string.template | #e6db74 | — |
| constant.character.escape, string.regexp.character-class, string source | #fd971f | — |
| string.regexp, string.regexp keyword.other | #fd971f | — |
| meta.template.expression.ts, punctuation.definition.template-expression | #f92672 | — |
| constant.numeric, constant.language, constant.language.boolean, constant.language.null, constant.language.undefined, constant.language.nan | #ae81ff | — |
| variable.other.constant, variable.other.enummember | #ae81ff | — |
| keyword, keyword.control, keyword.control.flow, keyword.control.import, keyword.control.from, keyword.control.as, keyword.control.export, keyword.other.using, keyword.other.await | #f92672 | bold |
| storage, storage.type, storage.modifier | #f92672 | bold |
| keyword.operator, keyword.operator.assignment, keyword.operator.comparison, keyword.operator.logical, keyword.operator.arithmetic, keyword.operator.bitwise, keyword.operator.ternary | #f92672 | — |
| entity.name.function, support.function, meta.function entity.name.function | #a6e22e | — |
| meta.function-call.generic, variable.function | #a6e22e | — |
| entity.name.function.member, support.function.magic | #a6e22e | — |
| entity.name.class, entity.name.type.class, entity.name.type.interface, entity.name.type.enum, entity.name.type.struct, entity.other.inherited-class | #66d9ef | — |
| meta.type.annotation, support.type, entity.name.type, meta.type.name | #66d9ef | — |
| entity.name.namespace, entity.name.module, meta.import entity.name.type | #66d9ef | italic |
| variable.parameter, meta.function.parameters variable.other | #fd971f | italic |
| meta.decorator, entity.name.function.decorator, support.type.decorator, punctuation.decorator | #e6db74 | italic |
| variable, variable.other, variable.other.readwrite, variable.other.object | #f8f8f2 | — |
| variable.language | #f92672 | italic |
| variable.other.property, meta.object-literal.key, support.type.property-name | #f8f8f2 | — |
| entity.name.tag, meta.tag.sgml | #f92672 | — |
| entity.other.attribute-name, entity.other.attribute-name.html | #a6e22e | — |
| string.quoted.double.html, string.quoted.single.html | #e6db74 | — |
| support.type.property-name.css, meta.property-name, source.css support.type | #66d9ef | — |
| entity.name.tag.css, meta.selector | #a6e22e | — |
| entity.other.pseudo-class, entity.other.pseudo-element, keyword.control.at-rule | #f92672 | — |
| keyword.other.unit, constant.numeric.css | #ae81ff | — |
| markup.heading, entity.name.section.markdown, punctuation.definition.heading.markdown | #a6e22e | bold |
| markup.bold, punctuation.definition.bold | #fd971f | bold |
| markup.italic, punctuation.definition.italic | #f92672 | italic |
| markup.inline.raw, markup.raw.inline | #66d9ef | — |
| markup.fenced_code.block, markup.raw.block | #e6db74 | — |
| markup.underline.link, string.other.link | #ae81ff | underline |
| markup.quote, punctuation.definition.quote | #75715e | italic |
| beginning.punctuation.definition.list.markdown, punctuation.definition.list_item.markdown | #f92672 | — |
| source.json meta.structure.dictionary.json support.type.property-name | #f8f8f2 | — |
| entity.name.tag.yaml, source.yaml entity.other.attribute-name | #66d9ef | — |
| keyword.key.toml, support.type.property-name.toml | #66d9ef | — |
| support.function.builtin.shell, entity.name.command.shell | #a6e22e | — |
| variable.other.normal.shell, variable.other.special.shell | #ae81ff | — |
| storage.modifier.lifetime.rust, entity.name.type.lifetime | #fd971f | italic |
| support.macro.rust, entity.name.function.macro.rust | #f92672 | — |
| support.type.builtin.go | #66d9ef | — |
| support.function.magic.python, entity.name.function.decorator.python | #a6e22e | italic |
| variable.parameter.function.language.python | #f92672 | italic |
| punctuation, meta.brace, punctuation.separator, punctuation.terminator | #f8f8f2 | — |
| punctuation.definition.tag | #f92672 | — |
| punctuation.definition.string | #e6db74 | — |
| punctuation.definition.comment | #75715e | — |
| invalid, invalid.illegal, invalid.deprecated | #ff5555 | underline |
| meta.annotation.java, meta.declaration.annotation.java, entity.name.annotation.java, punctuation.definition.annotation.java | #e6db74 | italic |
| keyword.control.java, keyword.other.java, storage.type.java, storage.modifier.java, keyword.other.import.java, keyword.other.package.java | #f92672 | bold |
| entity.name.type.class.java, entity.name.class.java, entity.name.type.java, storage.type.primitive.java, entity.other.inherited-class.java | #66d9ef | — |
| entity.name.function.java, entity.name.function.constructor.java | #a6e22e | — |
| variable.other.field.java, variable.other.object.java | #f8f8f2 | — |
| variable.other.constant.java, variable.other.enummember.java | #ae81ff | — |
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}!`;
}