Monokai v2.1
Publisher: Raymond LiThemes in package: 1
Monokai v2.1 — a dark Monokai variant ported from the Kate/KDE color scheme of the same name.
Monokai v2.1 — a dark Monokai variant ported from the Kate/KDE color scheme of the same name.
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 |
|---|---|---|
| meta.embedded, source.groovy.embedded, variable.legacy.builtin.python | #f8f8f2 | — |
| comment, punctuation.definition.comment | #d0d0d0 | — |
| comment.block.documentation, comment.block.javadoc, string.quoted.docstring | #a3a3ff | — |
| storage.type.class.jsdoc, punctuation.definition.block.tag.jsdoc, keyword.other.documentation, comment.block.documentation keyword, comment.block.documentation storage.type, entity.name.tag.documentation | #52afbf | — |
| meta.decorator entity.name.function, punctuation.decorator, storage.type.annotation, meta.annotation, entity.name.function.decorator | #a3a3ff | — |
| comment.block.region, meta.preprocessor.region | #75715e | — |
| keyword.other.alert, comment keyword.codetag.notation, comment.line.todo | #ff5555 | bold |
| keyword, keyword.other, storage, storage.type.function.arrow, storage.modifier, keyword.operator.new, keyword.operator.expression, keyword.operator.delete, keyword.operator.instanceof, keyword.operator.of, keyword.operator.in, keyword.operator.sizeof, keyword.operator.logical.python | #66d9ef | bold |
| keyword.control, keyword.control.flow, keyword.control.conditional, keyword.control.loop, keyword.control.exception, keyword.control.trycatch, keyword.control.return, storage.type.class.python | #f92672 | |
| keyword.control.import, keyword.control.export, keyword.control.from, keyword.control.at-rule.import, keyword.other.import, keyword.other.using, keyword.package, keyword.import, meta.import keyword.other, keyword.control.directive.include | #f92672 | |
| support.type.builtin, support.class.builtin, constant.language.builtin, variable.language.builtin, support.function.builtin, support.variable.magic, support.type.exception | #66d9ef | bold |
| storage.type, storage.type.primitive, storage.type.built-in, support.type, support.type.primitive, entity.name.type, entity.name.class, entity.name.namespace, entity.name.scope-resolution, entity.other.inherited-class, support.class, meta.type.annotation entity.name.type | #66d9ef | italic |
| entity.name.function, meta.function-call entity.name.function, meta.function-call.generic, support.function, variable.function, meta.require, entity.name.method, entity.name.function.member | #a6e22e | |
| entity.name.function.preprocessor, entity.name.function.macro, support.function.macro, meta.macro entity.name.function | #a6e22e | — |
| meta.preprocessor, keyword.control.directive, punctuation.definition.directive, keyword.preprocessor | #329932 | — |
| string.quoted.other.lt-gt.include, meta.preprocessor.include string, meta.preprocessor.string | #e6db74 | — |
| variable, variable.other, variable.other.readwrite, meta.definition.variable variable.other, variable.other.global, punctuation.definition.variable | #ff80f4 | — |
| variable.parameter, meta.function.parameters variable, entity.other.attribute-name, meta.attribute, variable.other.makefile | #fd971f | — |
| variable.language.this, variable.language.self, variable.language.special.self, keyword.other.this, variable.parameter.function.language.special.self | #fd971f | — |
| variable.other.property, variable.other.object.property, meta.property-name, support.variable.property, variable.other.member | #f8f8f2 | — |
| variable.other.enummember, variable.other.constant, constant.other.enum | #ae81ff | — |
| constant, constant.language, constant.language.boolean, constant.language.null, constant.language.undefined, support.constant, keyword.other.unit | #ae81ff | — |
| constant.numeric, constant.numeric.integer, constant.numeric.float, constant.numeric.hex, constant.numeric.octal, constant.numeric.binary, constant.other.placeholder.numeric | #ae81ff | — |
| string, string.quoted, string.quoted.single, string.quoted.double, punctuation.definition.string, string.unquoted, constant.character.escape.line-continuation | #e6db74 | — |
| string.quoted.single.c, constant.character, string.quoted.single.char | #e6db74 | — |
| string.quoted.other.raw, string.quoted.triple, string.unquoted.heredoc, string.regexp.raw, meta.string.raw | #d8c72c | — |
| string.regexp, string.template, string.interpolated, punctuation.definition.string.template, constant.other.symbol | #e6db74 | — |
| constant.character.escape, constant.other.character-class.escape, constant.character.entity, keyword.other.escape | #ae81ff | — |
| punctuation.definition.template-expression, punctuation.section.embedded, meta.template.expression punctuation.definition, constant.other.placeholder, punctuation.definition.interpolation | #f92672 | — |
| keyword.operator, keyword.operator.assignment, keyword.operator.arithmetic, keyword.operator.comparison, keyword.operator.logical, keyword.operator.bitwise, keyword.operator.ternary, punctuation, punctuation.separator, punctuation.terminator, punctuation.accessor, meta.brace, punctuation.section | #d0d0d0 | — |
| entity.name.label, entity.name.section, support.other | #a6e22e | — |
| support.type.property-name.json.comments, keyword.other.special-method | #e5ce00 | — |
| invalid, invalid.illegal | #ff5555 | underline |
| invalid.deprecated | #ff5555 | — |
| support.type.property-name.json, meta.structure.dictionary.json support.type.property-name, entity.name.tag.yaml, support.type.property-name.toml | #f92672 | |
| markup.heading, entity.name.section.markdown, punctuation.definition.heading.markdown | #a6e22e | bold |
| markup.bold, punctuation.definition.bold.markdown | #66d9ef | bold |
| markup.italic, punctuation.definition.italic.markdown | #66d9ef | italic |
| markup.underline.link, string.other.link, constant.other.reference.link.markdown, punctuation.definition.constant.markdown, meta.link.reference | #ae81ff | — |
| string.other.link.title.markdown, string.other.link.description.markdown | #66d9ef | — |
| markup.inline.raw, markup.raw.block, fenced_code.block.language | #e6db74 | — |
| markup.list punctuation.definition.list, beginning.punctuation.definition.list.markdown, markup.quote | #d0d0d0 | — |
| markup.inserted, meta.diff.header.to-file, punctuation.definition.inserted | #a6e22e | — |
| markup.deleted, meta.diff.header.from-file, punctuation.definition.deleted | #f92672 | — |
| markup.changed, meta.diff.range, punctuation.definition.changed | #e6db74 | — |
| entity.name.tag, punctuation.definition.tag, meta.tag | #f92672 | — |
| support.class.component, entity.name.tag.namespace, meta.jsx.children support.class.component, entity.name.tag.tsx support.class.component | #66d9ef | |
| entity.other.attribute-name.class.css, entity.other.attribute-name.id.css, entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css | #a6e22e | — |
| support.type.property-name.css, support.type.vendored.property-name.css | #66d9ef | — |
| support.constant.property-value.css, meta.property-value.css, constant.other.color | #ae81ff | — |
| entity.name.function.target.makefile, entity.name.function.target | #a6e22e | — |
| storage.modifier.lifetime.rust, entity.name.lifetime.rust, punctuation.definition.lifetime.rust | #f92672 | — |
| entity.name.function.macro.rust, support.function.macro.rust, meta.macro.rules.rust entity.name | #a6e22e | — |
| constant.language.go, support.type.builtin.go | #ae81ff | — |
| variable.other.register, storage.other.register, support.type.register | #fd971f | |
| keyword.operator.quantifier.regexp, keyword.control.anchor.regexp, keyword.other.back-reference.regexp | #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}!`;
}