KnFocus
Publisher: KnighttowerThemes in package: 3
Dark themes to focus on the code
Dark themes to focus on the 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 |
|---|---|---|
| meta.embedded, source.groovy.embedded, string meta.image.inline.markdown | #D4D4D4 | — |
| emphasis | — | italic |
| strong | — | bold |
| header | #000080 | — |
| comment | #6A9955 | — |
| constant.language | #569CD6 | — |
| constant.numeric, variable.other.enummember, keyword.operator.plus.exponent, keyword.operator.minus.exponent | #B5CEA8 | — |
| constant.regexp | #646695 | — |
| entity.name.tag | #569CD6 | — |
| entity.name.tag.css | #D7BA7D | — |
| entity.other.attribute-name | #9CDCFE | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.class.mixin.css, entity.other.attribute-name.id.css, entity.other.attribute-name.parent-selector.css, entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css, source.css.less entity.other.attribute-name.id, entity.other.attribute-name.scss | #D7BA7D | — |
| invalid | #F44747 | — |
| markup.underline | — | underline |
| markup.bold | #569CD6 | bold |
| markup.heading | #569CD6 | bold |
| markup.italic | — | italic |
| markup.strikethrough | — | strikethrough |
| markup.inserted | #B5CEA8 | — |
| markup.deleted | #CE9178 | — |
| markup.changed | #569CD6 | — |
| punctuation.definition.quote.begin.markdown | #6A9955 | — |
| punctuation.definition.list.begin.markdown | #6796E6 | — |
| markup.inline.raw | #CE9178 | — |
| punctuation.definition.tag | #808080 | — |
| meta.preprocessor, entity.name.function.preprocessor | #569CD6 | — |
| meta.preprocessor.string | #CE9178 | — |
| meta.preprocessor.numeric | #B5CEA8 | — |
| meta.structure.dictionary.key.python | #9CDCFE | — |
| meta.diff.header | #569CD6 | — |
| storage | #569CD6 | — |
| storage.type | #569CD6 | — |
| storage.modifier, keyword.operator.noexcept | #569CD6 | — |
| string, meta.embedded.assembly | #CE9178 | — |
| string.tag | #CE9178 | — |
| string.value | #CE9178 | — |
| string.regexp | #D16969 | — |
| punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded | #569CD6 | — |
| meta.template.expression | #D4D4D4 | — |
| support.type.vendored.property-name, support.type.property-name, variable.css, variable.scss, variable.other.less, source.coffee.embedded | #9CDCFE | — |
| keyword | #569CD6 | — |
| keyword.control | #569CD6 | — |
| keyword.operator | #D4D4D4 | — |
| keyword.operator.new, keyword.operator.expression, keyword.operator.cast, keyword.operator.sizeof, keyword.operator.alignof, keyword.operator.typeid, keyword.operator.alignas, keyword.operator.instanceof, keyword.operator.logical.python, keyword.operator.wordlike | #569CD6 | — |
| keyword.other.unit | #B5CEA8 | — |
| punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php | #569CD6 | — |
| support.function.git-rebase | #9CDCFE | — |
| constant.sha.git-rebase | #B5CEA8 | — |
| storage.modifier.import.java, variable.language.wildcard.java, storage.modifier.package.java | #D4D4D4 | — |
| variable.language | #569CD6 | — |
| entity.name.function, support.function, support.constant.handlebars, source.powershell variable.other.member, entity.name.operator.custom-literal | #DCDCAA | — |
| support.class, support.type, entity.name.type, entity.name.namespace, entity.other.attribute, entity.name.scope-resolution, entity.name.class, storage.type.numeric.go, storage.type.byte.go, storage.type.boolean.go, storage.type.string.go, storage.type.uintptr.go, storage.type.error.go, storage.type.rune.go, storage.type.cs, storage.type.generic.cs, storage.type.modifier.cs, storage.type.variable.cs, storage.type.annotation.java, storage.type.generic.java, storage.type.java, storage.type.object.array.java, storage.type.primitive.array.java, storage.type.primitive.java, storage.type.token.java, storage.type.groovy, storage.type.annotation.groovy, storage.type.parameters.groovy, storage.type.generic.groovy, storage.type.object.array.groovy, storage.type.primitive.array.groovy, storage.type.primitive.groovy | #4EC9B0 | — |
| meta.type.cast.expr, meta.type.new.expr, support.constant.math, support.constant.dom, support.constant.json, entity.other.inherited-class | #4EC9B0 | — |
| keyword.control, source.cpp keyword.operator.new, keyword.operator.delete, keyword.other.using, keyword.other.operator, entity.name.operator | #C586C0 | — |
| variable, meta.definition.variable.name, support.variable, entity.name.variable, constant.other.placeholder | #9CDCFE | — |
| variable.other.constant, variable.other.enummember | #4FC1FF | — |
| meta.object-literal.key | #9CDCFE | — |
| support.constant.property-value, support.constant.font-name, support.constant.media-type, support.constant.media, constant.other.color.rgb-value, constant.other.rgb-value, support.constant.color | #CE9178 | — |
| punctuation.definition.group.regexp, punctuation.definition.group.assertion.regexp, punctuation.definition.character-class.regexp, punctuation.character.set.begin.regexp, punctuation.character.set.end.regexp, keyword.operator.negation.regexp, support.other.parenthesis.regexp | #CE9178 | — |
| constant.character.character-class.regexp, constant.other.character-class.set.regexp, constant.other.character-class.regexp, constant.character.set.regexp | #D16969 | — |
| keyword.operator.or.regexp, keyword.control.anchor.regexp | #DCDCAA | — |
| keyword.operator.quantifier.regexp | #D7BA7D | — |
| constant.character, constant.other.option | #569CD6 | — |
| constant.character.escape | #D7BA7D | — |
| entity.name.label | #C8C8C8 | — |
| constant.language, entity.name.tag, markup.changed, meta.preprocessor, entity.name.function.preprocessor, meta.diff.header, storage, storage.type, storage.modifier, keyword.operator.noexcept, punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded, keyword, keyword.control, keyword.operator.new, keyword.operator.expression, keyword.operator.cast, keyword.operator.sizeof, keyword.operator.alignof, keyword.operator.typeid, keyword.operator.alignas, keyword.operator.instanceof, keyword.operator.logical.python, keyword.operator.wordlike, punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php, variable.language, constant.character, constant.other.option | #977C5C | — |
| constant.numeric, variable.other.enummember, keyword.operator.plus.exponent, keyword.operator.minus.exponent, markup.inserted, meta.preprocessor.numeric, keyword.other.unit, constant.sha.git-rebase | #60F112 | — |
| entity.name.tag.css, entity.other.attribute-name.class.css, entity.other.attribute-name.class.mixin.css, entity.other.attribute-name.id.css, entity.other.attribute-name.parent-selector.css, entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css, source.css.less entity.other.attribute-name.id, entity.other.attribute-name.scss, keyword.operator.quantifier.regexp, constant.character.escape | #E19A00 | — |
| entity.other.attribute-name, meta.structure.dictionary.key.python, support.type.vendored.property-name, support.type.property-name, variable.css, variable.scss, variable.other.less, source.coffee.embedded, support.function.git-rebase, variable, meta.definition.variable.name, support.variable, entity.name.variable, constant.other.placeholder, meta.object-literal.key | #6A8A9B | — |
| invalid, invalid.illegal.non-null-typehinted.php, token.error-token | #F44747 | — |
| markup.underline | — | underline |
| markup.bold, markup.heading | #569CD6 | bold |
| markup.strikethrough | — | strikethrough |
| markup.deleted, markup.inline.raw, meta.preprocessor.string, string, meta.embedded.assembly, string.tag, string.value, support.constant.property-value, support.constant.font-name, support.constant.media-type, support.constant.media, constant.other.color.rgb-value, constant.other.rgb-value, support.constant.color, punctuation.definition.group.regexp, punctuation.definition.group.assertion.regexp, punctuation.definition.character-class.regexp, punctuation.character.set.begin.regexp, punctuation.character.set.end.regexp, keyword.operator.negation.regexp, support.other.parenthesis.regexp | #CE9178 | — |
| punctuation.definition.list.begin.markdown | #6796E6 | — |
| punctuation.definition.tag | #808080 | — |
| string.regexp, constant.character.character-class.regexp, constant.other.character-class.set.regexp, constant.other.character-class.regexp, constant.character.set.regexp | #D16969 | — |
| entity.name.function, support.function, support.constant.handlebars, source.powershell variable.other.member, entity.name.operator.custom-literal, keyword.operator.or.regexp, keyword.control.anchor.regexp | #DCDCAA | — |
| support.class, support.type, entity.name.type, entity.name.namespace, entity.other.attribute, entity.name.scope-resolution, entity.name.class, storage.type.numeric.go, storage.type.byte.go, storage.type.boolean.go, storage.type.string.go, storage.type.uintptr.go, storage.type.error.go, storage.type.rune.go, storage.type.cs, storage.type.generic.cs, storage.type.modifier.cs, storage.type.variable.cs, storage.type.annotation.java, storage.type.generic.java, storage.type.java, storage.type.object.array.java, storage.type.primitive.array.java, storage.type.primitive.java, storage.type.token.java, storage.type.groovy, storage.type.annotation.groovy, storage.type.parameters.groovy, storage.type.generic.groovy, storage.type.object.array.groovy, storage.type.primitive.array.groovy, storage.type.primitive.groovy, meta.type.cast.expr, meta.type.new.expr, support.constant.math, support.constant.dom, support.constant.json, entity.other.inherited-class | #4EC9B0 | — |
| keyword.control, source.cpp keyword.operator.new, keyword.operator.delete, keyword.other.using, keyword.other.operator, entity.name.operator | #C586C0 | — |
| variable.other.constant, variable.other.enummember | #4FC1FF | — |
| entity.name.label | #C8C8C8 | — |
| punctuation.definition.tag, punctuation.definition.delayed.unison,punctuation.definition.list.begin.unison,punctuation.definition.list.end.unison,punctuation.definition.ability.begin.unison,punctuation.definition.ability.end.unison,punctuation.operator.assignment.as.unison,punctuation.separator.pipe.unison,punctuation.separator.delimiter.unison,punctuation.definition.hash.unison, support.variable.magic.python, variable.language.rust, constant.other.character-class.regexp, markup.deleted.diff, meta.function.c,meta.function.cpp, source.java, meta.definition.variable.name.java, variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node, support.type.object.console, support.variable.dom,support.variable.property.dom, variable, variable.other.class.php, entity.name.tag, markup.heading, keyword.other.unit, entity.name.section.markdown, punctuation.definition.heading.markdown, punctuation.definition.list.begin.markdown, punctuation.definition.list.markdown, punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown, beginning.punctuation.definition.list.markdown, punctuation.definition.metadata.markdown, punctuation.section.embedded, variable.interpolation, source.json meta.structure.dictionary.json > string.quoted.json, source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string, support.type.property-name.json, support.type.property-name.json punctuation, selector.sass, entity.name.variable.local.cs, meta.property.object, variable.parameter.function.js, constant.character.entity, meta.symbol.clojure, meta.arguments.coffee, variable.parameter.function.coffee, meta.scope.prerequisites.makefile, meta.definition.variable.name.groovy, text.variable, text.bracketed, constant.character.character-class.regexp.xi, entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown | #6B7356 | — |
| variable.other.generic-type.haskell, support.constant.edge, keyword.operator.instanceof.java, keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof, keyword.operator.sigil.rust, keyword.operator.delete, keyword.operator.assignment.c,keyword.operator.comparison.c,keyword.operator.c,keyword.operator.increment.c,keyword.operator.decrement.c,keyword.operator.bitwise.shift.c,keyword.operator.assignment.cpp,keyword.operator.comparison.cpp,keyword.operator.cpp,keyword.operator.increment.cpp,keyword.operator.decrement.cpp,keyword.operator.bitwise.shift.cpp, punctuation.separator.c,punctuation.separator.cpp, keyword.operator.sizeof.c,keyword.operator.sizeof.cpp, keyword.operator.logical.python, keyword.operator.assignment.compound, keyword, token.package.keyword, keyword.control, storage, token.storage, keyword.operator.expression.delete,keyword.operator.expression.in,keyword.operator.expression.of,keyword.operator.expression.instanceof,keyword.operator.new,keyword.operator.expression.typeof,keyword.operator.expression.void, meta.selector, markup.italic, punctuation.definition.italic,todo.emphasis, emphasis md, markup.underline.link.markdown,markup.underline.link.image.markdown, punctuation.section.embedded.begin,punctuation.section.embedded.end, text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade, text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade, keyword.operator.error-control.php, keyword.operator.type.php, keyword.operator.regexp.php, keyword.operator.heredoc.php,keyword.operator.nowdoc.php, token.debug-token, punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded, keyword.operator.module, keyword.operator.arithmetic.go, keyword.operator.address.go, punctuation.quasi.element, support.type.texture.hlsl, support.type.sampler.hlsl, support.type.object.hlsl, support.type.object.rw.hlsl, support.type.fx.hlsl, support.type.object.hlsl, constant.regexp.xi | #576B10 | — |
| storage.type.haskell, keyword.operator.quantifier.regexp, support.constant.property.math, support.constant.property-value.scss,support.constant.property-value.css, support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss, support.constant.color.w3c-standard-color-name.css, support.constant.json, support.variable.property.process, variable.parameter.function.language.python, variable.parameter.function.python, constant.character.format.placeholder.other.python, control.elements, keyword.operator.less, support.constant.font-name, constant.numeric, constant, punctuation.definition.constant, entity.other.attribute-name, entity.other.attribute-name.class.css, markup.bold,todo.bold, punctuation.definition.bold.markdown, support.constant.core.rust, support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php, inline-color-decoration rgb-value, less rgb-value, token.warn-token, support.constant.elm, wikiword.xi | #99602F | — |
| punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python, storage.modifier.lifetime.rust, variable.parameter.function, punctuation.section.block.begin.bracket.curly.cpp,punctuation.section.block.end.bracket.curly.cpp,punctuation.terminator.statement.c,punctuation.section.block.begin.bracket.curly.c,punctuation.section.block.end.bracket.curly.c,punctuation.section.parens.begin.bracket.round.c,punctuation.section.parens.end.bracket.round.c,punctuation.section.parameters.begin.bracket.round.c,punctuation.section.parameters.end.bracket.round.c, punctuation.separator.key-value, punctuation.section.block.begin.java,punctuation.section.block.end.java,punctuation.definition.method-parameters.begin.java,punctuation.definition.method-parameters.end.java,meta.method.identifier.java,punctuation.section.method.begin.java,punctuation.section.method.end.java,punctuation.terminator.java,punctuation.section.class.begin.java,punctuation.section.class.end.java,punctuation.section.inner-class.begin.java,punctuation.section.inner-class.end.java,meta.method-call.java,punctuation.section.class.begin.bracket.curly.java,punctuation.section.class.end.bracket.curly.java,punctuation.section.method.begin.bracket.curly.java,punctuation.section.method.end.bracket.curly.java,punctuation.separator.period.java,punctuation.bracket.angle.java,punctuation.definition.annotation.java,meta.method.body.java, punctuation.separator.list.comma.css, keyword.operator.misc.rust, punctuation.separator.delimiter, punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python, keyword.operator, variable.c, token.variable.parameter.java, token.package, support.type.property-name, support.constant.property-value, meta.tag, markup.heading.setext, invalid.illegal.bad-ampersand.html, punctuation.section.array.begin.php, punctuation.section.array.end.php, punctuation.definition.parameters.begin.bracket.round.php,punctuation.definition.parameters.end.bracket.round.php,punctuation.separator.delimiter.php,punctuation.section.scope.begin.php,punctuation.section.scope.end.php,punctuation.terminator.expression.php,punctuation.definition.arguments.begin.bracket.round.php,punctuation.definition.arguments.end.bracket.round.php,punctuation.definition.storage-type.begin.bracket.round.php,punctuation.definition.storage-type.end.bracket.round.php,punctuation.definition.array.begin.bracket.round.php,punctuation.definition.array.end.bracket.round.php,punctuation.definition.begin.bracket.round.php,punctuation.definition.end.bracket.round.php,punctuation.definition.begin.bracket.curly.php,punctuation.definition.end.bracket.curly.php,punctuation.definition.section.switch-block.end.bracket.curly.php,punctuation.definition.section.switch-block.start.bracket.curly.php,punctuation.definition.section.switch-block.begin.bracket.curly.php,punctuation.definition.section.switch-block.end.bracket.curly.php, function.parameter, function.brace, function.parameter.ruby, function.parameter.cs, block.scope.end,block.scope.begin, meta.template.expression, invalid.xi, meta.brace.square, punctuation.definition.block.sequence.item.yaml | #A36A36 | — |
| variable.parameter.function.language.special.self.python, entity.name.lifetime.rust, markup.changed.diff, support.constant.math, variable.other.constant, storage.type.annotation.java, storage.type.object.array.java, storage.modifier.import.java,storage.type.java,storage.type.generic.java, support.module.node,support.type.object.module,support.module.node, entity.name.type.module, entity.name.namespace, variable.language, import.storage.java, entity.name.type.namespace, support.class, entity.name.type.class, entity.name.class.identifier.namespace.type, entity.name.class, variable.other.class.js, variable.other.class.ts, entity.name.type, token.storage.type.java, entity.other.inherited-class, punctuation.definition.bold, support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php, storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php, support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx, storage.type.cs, support.type.primitive, keyword.operator.assignment.go, entity.name.package.go, entity.global.clojure, source.makefile, storage.modifier.import.groovy, support.variable.semantic.hlsl, support.type.swift, support.type.vb.asp, entity.name.function.xi, entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition | #91733B | — |
| support.function.std.rust, meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff, keyword.operator.expression.import, meta.method.java, entity.name.function,support.function.console, meta.function-call.generic.python, entity.name.function, meta.require, support.function.any-method, variable.function, keyword.other.special-method, entity.other.attribute-name.id, markup.heading punctuation.definition.heading, entity.name.section, string.other.link.title.markdown,string.other.link.description.markdown, meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php, entity.name.goto-label.php,support.other.php, meta.function.decorator.python, token.info-token, support.type.type.flowtype, meta.method.groovy, constant.character.xi, accent.xi | #70750E | — |
| punctuation.definition.string.begin,punctuation.definition.string.end, markup.inserted.diff, string, markup.inline.raw.markdown, markup.inline.raw.string.markdown, source.json meta.structure.dictionary.json > value.json > string.quoted.json,source.json meta.structure.array.json > value.json > string.quoted.json,source.json meta.structure.dictionary.json > value.json > string.quoted.json > punctuation,source.json meta.structure.array.json > value.json > string.quoted.json > punctuation, keyword.other.template.begin, keyword.other.template.end, keyword.other.substitution.begin, keyword.other.substitution.end, source.ini, meta.definition.class.inherited.classes.groovy, beginning.punctuation.definition.quote.markdown.xi | #63685F | — |
| comment markup.link | #43454A | — |
| keyword.operator.logical, keyword.operator.bitwise, keyword.operator.channel, keyword.operator.css,keyword.operator.scss,keyword.operator.less, support.type.vendored.property-name.css, support.type.object.dom, keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational, support.type.posix-reserved.c,support.type.posix-reserved.cpp, support.type.python, keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts, support.function, constant.other.symbol, string.regexp, constant.character.escape, source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json, keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php, keyword.operator.comparison.php, support.token.decorator.python,meta.function.decorator.identifier.python, constant.language.symbol.ruby, rgb-value, keyword.operator.assignment, support.type.prelude.elm, entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class, constant.keyword.clojure, entity.name.class.xi, keyword.control.xi, constant.language.symbol.elixir | #775339 | — |
| invalid.illegal, invalid.broken, invalid.deprecated, invalid.unimplemented, constant.other.color.rgb-value.xi | #FFFFFF | — |
| beginning.punctuation.definition.list.markdown.xi, punctuation.definition.tag.xi, markup.quote.markdown | #2B2F38 | — |
| comment, punctuation.definition.comment | #2B2F38 | italic |
| comment, punctuation.definition.comment, comment.block.documentation.js, punctuation.definition.bracket.curly.end.jsdoc,comment.block.documentation.js, keyword.other.phpdoc, comment.block.documentation | #404A4F | italic |
| variable.other.jsdoc, storage.type.class.jsdoc, entity.name.type.instance.jsdoc, keyword.other.type, constant.language.access-type.jsdoc | #465156 | — |
| variable | #2E6C63 | italic |
| storage.type.js, variable.other.property, meta.use.php entity.other.alias | #87815E | |
| keyword.control.import.js, keyword.other.use, entity.name.tag.template.html | #846853 | — |
| variable.other.readwrite.alias.js, support.other.namespace, support.class, entity.name.label.js | #558994 | — |
| meta.use support.other.namespace | #1F4952 | — |
| string.quoted.single, text.html, variable.scss | #7E8793 | — |
| support.variable.js | #A2225C | — |
| variable.other.readwrite, variable.other.php | #147373 | italic |
| punctuation.definition.group.regexp | #105B5B | |
| storage.type.function | #9E5137 | |
| keyword.control.conditional, keyword.control.if, keyword.control.else, keyword.control.shell | #AC5B40 | |
| constant.language.boolean.true, constant.language.php, constant.language.json | #237A1C | italic |
| constant.language.boolean.false, constant.language.false.shell | #694073 | italic |
| constant.language.null, keyword.control.anchor.regexp, keyword.operator.or.regexp | #6B6980 | italic |
| storage.modifier, storage.type.class | #7A685A | italic |
| meta.attribute.class string.quoted.double.html, support.type.property-name.css, keyword.operator.expression.typeof | #6C6057 | italic |
| keyword.control.exit, keyword.control.flow, keyword.control.return, support.function.builtin.shell | #8F0959 | italic |
| entity.name.tag.script.html | #764A16 | italic |
| string.quoted.double.json, string.unquoted.plain.out.yaml, markup.inline.raw.string.markdown | #056774 | italic |
| punctuation.terminator.statement, punctuation.accessor, punctuation.separator.comma, punctuation.terminator.expression, punctuation.separator.parameter, punctuation.separator.label, meta.decorator, meta.function.expression, punctuation.decorator | #7A5C18 | |
| token.info-token | #6796E6 | — |
| token.warn-token | #CD9731 | — |
| token.error-token | #F44747 | — |
| token.debug-token | #B267E6 | — |
| keyword.operator.or.regexp, keyword.operator.logical | #6C3507 | bold |
| text.log, log.string | #384254 | — |
| log.constant | #544B3A | — |
| source.ignore, entity.name.tag.css | #38524B | — |
| support.type.object.module.js, entity.other.attribute-name.pseudo-element.css | #4E663A | — |
| constant.other.color.rgb-value | #6C2812 | — |
| invalid.illegal | #A13605 | — |
| text.html.markdown | #6D6F5B | — |
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}!`;
}