Knoctal Theme
Publisher: KnoctalThemes in package: 2
Knoctal dark theme for VS Code
Knoctal dark theme for VS Code
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 | #6f7176 | — |
| string, punctuation.definition.string | #d78787 | — |
| entity.name.function, storage.type.function.arrow, keyword.control.flow.return, meta.function.anonymous, variable.function | #a494ea | — |
| keyword | #ec647d | italic |
| storage.modifier.async, storage.modifier.async.ts, storage.modifier.async.tsx | #ec647d | italic |
| variable | #ffb383 | — |
| entity.name.type, entity.name.class, entity.name.namespace, entity.other.inherited-class, support.class, entity.name.type.class.tsx, entity.name.type.class.jsx, entity.name.type.module.ts, entity.name.type.module.js, entity.name.type.module.tsx, entity.name.type.module.jsx | #b38cce | — |
| storage.type, storage.type.interface.ts, storage.type.interface.tsx, storage.type.enum.ts, storage.type.enum.tsx, storage.type.type.ts, storage.type.type.tsx, keyword.operator.type.annotation.ts, keyword.operator.type.annotation.tsx | #83b5ff | italic |
| constant.numeric | #a4c1ff | — |
| keyword.operator | #ef5f72 | — |
| entity.name.tag | #FFC000 | — |
| support.class.component.jsx, support.class.component.js, support.class.component.tsx, entity.name.tag.js.jsx, entity.name.tag.js.js, entity.name.tag.tsx | #FFC000 | — |
| entity.other.attribute-name | #a4c1ff | — |
| punctuation | #c2c2c2 | — |
| invalid | #ff3333 | — |
| constant | #a4c1ff | — |
| variable.other.property | #a4c1ff | — |
| meta.return | #a4c1ff | italic |
| meta.object-literal.key | #c5cfe6 | — |
| support.type.property-name.css | #a4c1ff | — |
| support.function | #a494ea | — |
| support.constant.property-value.css | #FFC000 | italic |
| storage.type.built-in.cpp, entity.name.type.cpp, support.type.cpp, variable.other.cpp, storage.type.user-defined.cpp | #83b5ff | bold |
| support.type.primitive.ts, support.type.primitive.tsx, entity.name.type.primitive.ts, entity.name.type.primitive.tsx, variable.other.readwrite.ts.null, variable.other.readwrite.tsx.null, variable.other.readwrite.ts.undefined, variable.other.readwrite.tsx.undefined, support.type.builtin.ts, support.type.builtin.tsx, keyword.operator.expression.typeof.ts, keyword.operator.expression.typeof.tsx, support.type.primitive.ts, support.type.primitive.tsx | #83b5ff | italic |
| storage.modifier.ts, storage.modifier.tsx | #ec647d | italic bold |
| meta.decorator.ts, meta.decorator.tsx, entity.name.function.decorator.ts, entity.name.function.decorator.tsx | #FFC000 | italic |
| entity.name.type.parameter.ts, entity.name.type.parameter.tsx | #83b5ff | — |
| variable.other.enummember.ts, variable.other.enummember.tsx | #a4c1ff | — |
| entity.name.type.interface.ts, entity.name.type.interface.tsx | #b38cce | — |
| entity.name.type.alias.ts, entity.name.type.alias.tsx | #b38cce | — |
| entity.other.attribute-name.tsx | #a4c1ff | — |
| punctuation.definition.tag.begin.tsx, punctuation.definition.tag.end.tsx | #c2c2c2 | — |
| support.type.property-name.json | #a4c1ff | — |
| markup.heading | #FFC000 | bold |
| markup.italic | #d78787 | italic |
| markup.bold | #d78787 | bold |
| markup.inline.raw, markup.fenced_code.block | #a494ea | — |
| markup.underline.link | #83b5ff | underline |
| punctuation.definition.list.markdown | #FFC000 | bold |
| keyword.instruction.assembly | #ffcc00 | — |
| comment.line.assembly | #898989 | — |
| string.assembly | #d78787 | — |
| constant.numeric.assembly | #a4c1ff | — |
| variable.register.assembly | #ec647d | — |
| storage.type.directive.assembly | #ec647d | italic |
| entity.name.function.label.assembly | #a494ea | — |
| keyword.control.java, storage.modifier.java, storage.type.java | #ec647d | italic |
| entity.name.type.class.java, entity.other.inherited-class.java | #b38cce | — |
| entity.name.function.java, entity.name.function.method.java | #a494ea | — |
| storage.type.annotation.java | #FFC000 | italic |
| variable.other.definition.java | #ffb383 | — |
| variable.other.constant.java | #a4c1ff | — |
| storage.modifier.import.java, storage.modifier.package.java | #ec647d | italic |
| keyword.control.cs, storage.modifier.cs, keyword.other.namespace.cs, storage.type.cs | #ec647d | italic |
| storage.modifier.access.control.public.cs, storage.modifier.access.control.private.cs, storage.modifier.access.control.protected.cs, storage.modifier.access.control.internal.cs, storage.modifier.static.cs, storage.modifier.private.cs, storage.modifier.public.cs, storage.modifier.protected.cs, storage.modifier.internal.cs, storage.modifier.async.cs, storage.modifier.readonly.cs, storage.modifier.const.cs, storage.modifier.cs | #ec647d | italic |
| entity.name.type.class.cs, entity.name.type.struct.cs, entity.name.type.interface.cs, entity.other.inherited-class.cs | #b38cce | — |
| entity.name.type.namespace.cs | #b38cce | — |
| meta.preprocessor.cs, keyword.preprocessor.cs | #ec647d | italic |
| keyword.control.rust, keyword.operator.rust, storage.type.rust, storage.modifier.rust | #ec647d | italic |
| entity.name.type.rust, storage.type.core.rust, storage.class.std.rust | #b38cce | — |
| entity.name.function.rust, support.function.rust | #a494ea | — |
| support.macro.rust, entity.name.function.macro.rust | #FFC000 | — |
| meta.attribute.rust | #a4c1ff | italic |
| storage.modifier.lifetime.rust | #ef5f72 | italic |
| support.constant.core.rust, variable.other.constant.rust | #a4c1ff | — |
| keyword.control.zig, keyword.operator.zig, storage.type.zig, storage.modifier.zig | #ec647d | italic |
| entity.name.type.zig, storage.type.zig | #b38cce | — |
| entity.name.function.zig | #a494ea | — |
| support.function.builtin.zig | #FFC000 | — |
| variable.other.zig | #ffb383 | — |
| variable.other.constant.zig | #a4c1ff | — |
| punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php | #ef5f72 | — |
| keyword.control.php, keyword.other.php, storage.type.php, storage.modifier.php, keyword.other.namespace.php, keyword.other.use.php, keyword.other.function.use.php, keyword.other.class.php, keyword.other.interface.php, keyword.other.trait.php, keyword.control.import.include.php, keyword.operator.logical.php | #ec647d | italic |
| entity.name.function.php, support.function.php | #a494ea | — |
| entity.name.type.class.php, entity.name.type.interface.php, entity.name.type.trait.php, support.class.php | #b38cce | — |
| support.other.namespace.php, entity.name.type.namespace.php | #b38cce | — |
| variable.other.property.php | #a4c1ff | — |
| constant.language.php, support.function.magic.php | #FFC000 | italic |
| keyword.other.phpdoc.php, comment.block.documentation.php | #6f7176 | italic |
| meta.attribute.php, support.attribute.php | #FFC000 | italic |
| entity.name.tag.html.php, entity.name.tag.inline.php, entity.name.tag.block.php, punctuation.definition.tag.begin.html.php, punctuation.definition.tag.end.html.php, entity.name.tag.structure.any.html.php | #FFC000 | — |
| entity.other.attribute-name.html.php, entity.other.attribute-name.id.html.php, entity.other.attribute-name.class.html.php | #a4c1ff | — |
| variable.other.php | #ffb383 | — |
| string.quoted.double.html.php, string.quoted.single.html.php | #d78787 | — |
| meta.tag.metadata.doctype.html.php, entity.name.tag.doctype.html.php | #ec647d | italic |
| variable.other.php.embedded, punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php | #ffb383 | — |
| keyword.control.kotlin, storage.modifier.kotlin | #ec647d | italic |
| entity.name.type.class.kotlin, support.class.kotlin | #b38cce | — |
| entity.name.function.kotlin | #a494ea | — |
| storage.type.annotation.kotlin | #FFC000 | italic |
| variable.other.kotlin | #ffb383 | — |
| meta.template.expression.kotlin | #ffb383 | — |
| string.quoted.triple.kotlin | #d78787 | — |
| constant.language.kotlin | #a4c1ff | — |
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}!`;
}