Dionysuz Theme
A VSCode theme with a clear and dark background
A VSCode theme with a clear and dark background
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 |
|---|---|---|
| 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 | #6793b8 | — |
| variable.other.generic-type.haskell | #9d6bab | — |
| storage.type.haskell | #bebebe | — |
| support.variable.magic.python | #6793b8 | — |
| punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python | #bebebe | — |
| variable.parameter.function.language.special.self.python | #e5c07b | — |
| storage.modifier.lifetime.rust | #bebebe | — |
| support.function.std.rust | #db7340 | — |
| entity.name.lifetime.rust | #e5c07b | — |
| variable.language.rust | #6793b8 | — |
| support.constant.edge | #9d6bab | — |
| constant.other.character-class.regexp | #6793b8 | — |
| keyword.operator.quantifier.regexp | #bebebe | — |
| punctuation.definition.string.begin,punctuation.definition.string.end | #6f9f65 | — |
| variable.parameter.function | #bebebe | — |
| comment markup.link | #7f848e | — |
| markup.changed.diff | #e5c07b | — |
| meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff | #db7340 | — |
| markup.inserted.diff | #6f9f65 | — |
| markup.deleted.diff | #6793b8 | — |
| meta.function.c,meta.function.cpp | #6793b8 | — |
| 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 | #bebebe | — |
| punctuation.separator.key-value | #bebebe | — |
| keyword.operator.expression.import | #db7340 | — |
| support.constant.math | #e5c07b | — |
| support.constant.property.math | #bebebe | — |
| variable.other.constant | #e5c07b | — |
| storage.type.annotation.java, storage.type.object.array.java | #e5c07b | — |
| source.java | #6793b8 | — |
| 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 | #bebebe | — |
| meta.method.java | #db7340 | — |
| storage.modifier.import.java,storage.type.java,storage.type.generic.java | #e5c07b | — |
| keyword.operator.instanceof.java | #9d6bab | — |
| meta.definition.variable.name.java | #6793b8 | — |
| keyword.operator.logical | #bebebe | — |
| keyword.operator.bitwise | #bebebe | — |
| keyword.operator.channel | #bebebe | — |
| support.constant.property-value.scss,support.constant.property-value.css | #bebebe | — |
| keyword.operator.css,keyword.operator.scss,keyword.operator.less | #bebebe | — |
| support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss | #bebebe | — |
| punctuation.separator.list.comma.css | #bebebe | — |
| support.constant.color.w3c-standard-color-name.css | #bebebe | — |
| support.type.vendored.property-name.css | #bebebe | — |
| support.module.node,support.type.object.module,support.module.node | #e5c07b | — |
| entity.name.type.module | #e5c07b | — |
| variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node | #6793b8 | — |
| support.constant.json | #bebebe | — |
| keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof | #9d6bab | — |
| support.type.object.console | #6793b8 | — |
| support.variable.property.process | #bebebe | — |
| entity.name.function,support.function.console | #db7340 | — |
| keyword.operator.misc.rust | #bebebe | — |
| keyword.operator.sigil.rust | #9d6bab | — |
| keyword.operator.delete | #9d6bab | — |
| support.type.object.dom | #bebebe | — |
| support.variable.dom,support.variable.property.dom | #6793b8 | — |
| keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational | #bebebe | — |
| 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 | #9d6bab | — |
| punctuation.separator.delimiter | #bebebe | — |
| punctuation.separator.c,punctuation.separator.cpp | #9d6bab | — |
| support.type.posix-reserved.c,support.type.posix-reserved.cpp | #bebebe | — |
| keyword.operator.sizeof.c,keyword.operator.sizeof.cpp | #9d6bab | — |
| variable.parameter.function.language.python | #bebebe | — |
| support.type.python | #bebebe | — |
| keyword.operator.logical.python | #9d6bab | — |
| variable.parameter.function.python | #bebebe | — |
| punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python | #bebebe | — |
| meta.function-call.generic.python | #db7340 | — |
| constant.character.format.placeholder.other.python | #bebebe | — |
| keyword.operator | #bebebe | — |
| keyword.operator.assignment.compound | #9d6bab | — |
| keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts | #bebebe | — |
| keyword | #9d6bab | — |
| entity.name.namespace | #e5c07b | — |
| variable | #6793b8 | — |
| variable.c | #bebebe | — |
| variable.language | #e5c07b | — |
| token.variable.parameter.java | #bebebe | — |
| import.storage.java | #e5c07b | — |
| token.package.keyword | #9d6bab | — |
| token.package | #bebebe | — |
| entity.name.function, meta.require, support.function.any-method, variable.function | #db7340 | — |
| entity.name.type.namespace | #e5c07b | — |
| support.class, entity.name.type.class | #e5c07b | — |
| entity.name.class.identifier.namespace.type | #e5c07b | — |
| entity.name.class, variable.other.class.js, variable.other.class.ts | #e5c07b | — |
| variable.other.class.php | #6793b8 | — |
| entity.name.type | #e5c07b | — |
| keyword.control | #9d6bab | — |
| control.elements, keyword.operator.less | #bebebe | — |
| keyword.other.special-method | #db7340 | — |
| storage | #9d6bab | — |
| token.storage | #9d6bab | — |
| 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 | #9d6bab | — |
| token.storage.type.java | #e5c07b | — |
| support.function | #bebebe | — |
| support.type.property-name | #bebebe | — |
| support.constant.property-value | #bebebe | — |
| support.constant.font-name | #bebebe | — |
| meta.tag | #bebebe | — |
| string | #6f9f65 | — |
| entity.other.inherited-class | #e5c07b | — |
| constant.other.symbol | #bebebe | — |
| constant.numeric | #bebebe | — |
| constant | #bebebe | — |
| punctuation.definition.constant | #bebebe | — |
| entity.name.tag | #6793b8 | — |
| entity.other.attribute-name | #bebebe | — |
| entity.other.attribute-name.id | #db7340 | normal |
| entity.other.attribute-name.class.css | #bebebe | normal |
| meta.selector | #9d6bab | — |
| markup.heading | #6793b8 | — |
| markup.heading punctuation.definition.heading, entity.name.section | #db7340 | — |
| keyword.other.unit | #6793b8 | — |
| markup.bold,todo.bold | #bebebe | — |
| punctuation.definition.bold | #e5c07b | — |
| markup.italic, punctuation.definition.italic,todo.emphasis | #9d6bab | — |
| emphasis md | #9d6bab | — |
| entity.name.section.markdown | #6793b8 | — |
| punctuation.definition.heading.markdown | #6793b8 | — |
| punctuation.definition.list.begin.markdown | #6793b8 | — |
| markup.heading.setext | #bebebe | — |
| punctuation.definition.bold.markdown | #bebebe | — |
| markup.inline.raw.markdown | #6f9f65 | — |
| markup.inline.raw.string.markdown | #6f9f65 | — |
| punctuation.definition.list.markdown | #6793b8 | — |
| punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown | #6793b8 | — |
| beginning.punctuation.definition.list.markdown | #6793b8 | — |
| punctuation.definition.metadata.markdown | #6793b8 | — |
| markup.underline.link.markdown,markup.underline.link.image.markdown | #9d6bab | — |
| string.other.link.title.markdown,string.other.link.description.markdown | #db7340 | — |
| string.regexp | #bebebe | — |
| constant.character.escape | #bebebe | — |
| punctuation.section.embedded, variable.interpolation | #6793b8 | — |
| punctuation.section.embedded.begin,punctuation.section.embedded.end | #9d6bab | — |
| invalid.illegal | #ffffff | — |
| invalid.illegal.bad-ampersand.html | #bebebe | — |
| invalid.broken | #ffffff | — |
| invalid.deprecated | #ffffff | — |
| invalid.unimplemented | #ffffff | — |
| source.json meta.structure.dictionary.json > string.quoted.json | #6793b8 | — |
| source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string | #6793b8 | — |
| 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 | #6f9f65 | — |
| source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json | #bebebe | — |
| support.type.property-name.json | #6793b8 | — |
| support.type.property-name.json punctuation | #6793b8 | — |
| text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade | #9d6bab | — |
| text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade | #9d6bab | — |
| support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php | #e5c07b | — |
| keyword.operator.error-control.php | #9d6bab | — |
| keyword.operator.type.php | #9d6bab | — |
| punctuation.section.array.begin.php | #bebebe | — |
| punctuation.section.array.end.php | #bebebe | — |
| invalid.illegal.non-null-typehinted.php | #f44747 | — |
| storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php | #e5c07b | — |
| meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php | #db7340 | — |
| 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 | #bebebe | — |
| support.constant.core.rust | #bebebe | — |
| support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php | #bebebe | — |
| entity.name.goto-label.php,support.other.php | #db7340 | — |
| keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php | #bebebe | — |
| keyword.operator.regexp.php | #9d6bab | — |
| keyword.operator.comparison.php | #bebebe | — |
| keyword.operator.heredoc.php,keyword.operator.nowdoc.php | #9d6bab | — |
| meta.function.decorator.python | #db7340 | — |
| support.token.decorator.python,meta.function.decorator.identifier.python | #bebebe | — |
| function.parameter | #bebebe | — |
| function.brace | #bebebe | — |
| function.parameter.ruby, function.parameter.cs | #bebebe | — |
| constant.language.symbol.ruby | #bebebe | — |
| rgb-value | #bebebe | — |
| inline-color-decoration rgb-value | #bebebe | — |
| less rgb-value | #bebebe | — |
| selector.sass | #6793b8 | — |
| support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx | #e5c07b | — |
| block.scope.end,block.scope.begin | #bebebe | — |
| storage.type.cs | #e5c07b | — |
| entity.name.variable.local.cs | #6793b8 | — |
| token.info-token | #db7340 | — |
| token.warn-token | #bebebe | — |
| token.error-token | #f44747 | — |
| token.debug-token | #9d6bab | — |
| punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded | #9d6bab | — |
| meta.template.expression | #bebebe | — |
| keyword.operator.module | #9d6bab | — |
| support.type.type.flowtype | #db7340 | — |
| support.type.primitive | #e5c07b | — |
| meta.property.object | #6793b8 | — |
| variable.parameter.function.js | #6793b8 | — |
| keyword.other.template.begin | #6f9f65 | — |
| keyword.other.template.end | #6f9f65 | — |
| keyword.other.substitution.begin | #6f9f65 | — |
| keyword.other.substitution.end | #6f9f65 | — |
| keyword.operator.assignment | #bebebe | — |
| keyword.operator.assignment.go | #e5c07b | — |
| keyword.operator.arithmetic.go, keyword.operator.address.go | #9d6bab | — |
| entity.name.package.go | #e5c07b | — |
| support.type.prelude.elm | #bebebe | — |
| support.constant.elm | #bebebe | — |
| punctuation.quasi.element | #9d6bab | — |
| constant.character.entity | #6793b8 | — |
| entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class | #bebebe | — |
| entity.global.clojure | #e5c07b | — |
| meta.symbol.clojure | #6793b8 | — |
| constant.keyword.clojure | #bebebe | — |
| meta.arguments.coffee, variable.parameter.function.coffee | #6793b8 | — |
| source.ini | #6f9f65 | — |
| meta.scope.prerequisites.makefile | #6793b8 | — |
| source.makefile | #e5c07b | — |
| storage.modifier.import.groovy | #e5c07b | — |
| meta.method.groovy | #db7340 | — |
| meta.definition.variable.name.groovy | #6793b8 | — |
| meta.definition.class.inherited.classes.groovy | #6f9f65 | — |
| support.variable.semantic.hlsl | #e5c07b | — |
| 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 | #9d6bab | — |
| text.variable, text.bracketed | #6793b8 | — |
| support.type.swift, support.type.vb.asp | #e5c07b | — |
| entity.name.function.xi | #e5c07b | — |
| entity.name.class.xi | #bebebe | — |
| constant.character.character-class.regexp.xi | #6793b8 | — |
| constant.regexp.xi | #9d6bab | — |
| keyword.control.xi | #bebebe | — |
| invalid.xi | #bebebe | — |
| beginning.punctuation.definition.quote.markdown.xi | #6f9f65 | — |
| beginning.punctuation.definition.list.markdown.xi | #7f848e | — |
| constant.character.xi | #db7340 | — |
| accent.xi | #db7340 | — |
| wikiword.xi | #bebebe | — |
| constant.other.color.rgb-value.xi | #ffffff | — |
| punctuation.definition.tag.xi | #7f848e | — |
| entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition | #e5c07b | — |
| entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown | #6793b8 | — |
| meta.brace.square | #bebebe | — |
| comment, punctuation.definition.comment | #7f848e | italic |
| markup.quote.markdown | #7f848e | — |
| punctuation.definition.block.sequence.item.yaml | #bebebe | — |
| constant.language.symbol.elixir | #bebebe | — |
| entity.other.attribute-name.js,entity.other.attribute-name.ts,entity.other.attribute-name.jsx,entity.other.attribute-name.tsx,variable.parameter,variable.language.super | — | italic |
| comment.line.double-slash,comment.block.documentation | — | italic |
| keyword.control.import.python,keyword.control.flow.python | — | italic |
| markup.italic.markdown | — | italic |
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, markup.quote.markdown, meta.diff, meta.diff.header | #5f6167 | — |
| meta.template.expression.js, constant.name.attribute.tag.jade, punctuation.definition.metadata.markdown, punctuation.definition.string.end.markdown, punctuation.definition.string.begin.markdown, string.quoted.double.dockerfile | #f8cf5d | — |
| variable, property, support.class, keyword.operator, support.constant, support.variable, entity.name.tag.yaml, constant.character.entity.html, source.css entity.name.tag.reference, beginning.punctuation.definition.list.markdown, source.css entity.other.attribute-name.parent-selector, meta.structure.dictionary.json support.type.property-name, keyword.other.special-method.dockerfile, markup.italic, markup.underline.link.markdown | #5FA5DB | — |
| markup.bold, constant, constant.numeric, meta.group.regexp, constant.other.php, support.constant.ext.php, constant.other.class.php, support.constant.core.php, fenced_code.block.language, constant.other.caps.python, entity.other.attribute-name, support.type.exception.python, source.css keyword.other.unit | #f39c12 | — |
| text.xml string, entity.name.type, support.function, entity.other.attribute-name, meta.at-rule.extend, entity.name.function, entity.other.inherited-class, entity.other.keyframe-offset.css, text.html.markdown string.quoted, meta.function-call.generic.python, meta.at-rule.extend support.constant, entity.other.attribute-name.class.jade, source.css entity.other.attribute-name, text.xml punctuation.definition.string | #bd6bf8 | — |
| markup.heading, variable.language.this.js, variable.language.special.self.python | #46e6de | — |
| punctuation.definition.interpolation, punctuation.section.embedded.end.php, punctuation.section.embedded.end.ruby, punctuation.section.embedded.begin.php, punctuation.section.embedded.begin.ruby, punctuation.definition.template-expression, entity.name.tag | #f8518e | — |
| storage, storage.type, support.type, support.class, keyword, meta.link, meta.image, source.js support.type | #9073a5 | — |
| string.regexp, markup.changed | #3A75C4 | — |
| source.css support.function, source.php support.function, support.function.magic.python, entity.other.attribute-name.id, markup.deleted | #f85353 | — |
| string, markup.list, text.html.php string, markup.inline.raw, markup.inserted, source.dockerfile, text.html.markdown string, punctuation.definition.string, punctuation.definition.markdown, text.html meta.embedded source.js string, text.html.php punctuation.definition.string, text.html meta.embedded source.js punctuation.definition.string, text.html punctuation.definition.string, text.html string | #e0af6f | — |
| variable.parameter.ts, entity.name.type.ts | — | italic |
| comment, markup.quote.markdown, meta.diff, meta.diff.header | #5f6167 | — |
| meta.template.expression.js, constant.name.attribute.tag.jade, punctuation.definition.metadata.markdown, punctuation.definition.string.end.markdown, punctuation.definition.string.begin.markdown, string.quoted.double.dockerfile | #f8cf5d | — |
| variable, property, support.class, keyword.operator, support.constant, support.variable, entity.name.tag.yaml, constant.character.entity.html, source.css entity.name.tag.reference, beginning.punctuation.definition.list.markdown, source.css entity.other.attribute-name.parent-selector, meta.structure.dictionary.json support.type.property-name, keyword.other.special-method.dockerfile, markup.italic, markup.underline.link.markdown | #5FA5DB | — |
| markup.bold, constant, constant.numeric, meta.group.regexp, constant.other.php, support.constant.ext.php, constant.other.class.php, support.constant.core.php, fenced_code.block.language, constant.other.caps.python, entity.other.attribute-name, support.type.exception.python, source.css keyword.other.unit | #f39c12 | — |
| text.xml string, entity.name.type, support.function, entity.other.attribute-name, meta.at-rule.extend, entity.name.function, entity.other.inherited-class, entity.other.keyframe-offset.css, text.html.markdown string.quoted, meta.function-call.generic.python, meta.at-rule.extend support.constant, entity.other.attribute-name.class.jade, source.css entity.other.attribute-name, text.xml punctuation.definition.string | #bd6bf8 | — |
| markup.heading, variable.language.this.js, variable.language.special.self.python | #46e6de | — |
| punctuation.definition.interpolation, punctuation.section.embedded.end.php, punctuation.section.embedded.end.ruby, punctuation.section.embedded.begin.php, punctuation.section.embedded.begin.ruby, punctuation.definition.template-expression, entity.name.tag | #f8518e | — |
| storage, storage.type, support.type, support.class, keyword, meta.link, meta.image, source.js support.type | #9073a5 | — |
| string.regexp, markup.changed | #3A75C4 | — |
| source.css support.function, source.php support.function, support.function.magic.python, entity.other.attribute-name.id, markup.deleted | #f85353 | — |
| string, markup.list, text.html.php string, markup.inline.raw, markup.inserted, source.dockerfile, text.html.markdown string, punctuation.definition.string, punctuation.definition.markdown, text.html meta.embedded source.js string, text.html.php punctuation.definition.string, text.html meta.embedded source.js punctuation.definition.string, text.html punctuation.definition.string, text.html string | #e0af6f | — |
| variable.parameter.ts, entity.name.type.ts | — | italic |
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 |
|---|---|---|
| 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 | #6793b8 | — |
| variable.other.generic-type.haskell | #9d6bab | — |
| storage.type.haskell | #bebebe | — |
| support.variable.magic.python | #6793b8 | — |
| punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python | #bebebe | — |
| variable.parameter.function.language.special.self.python | #e5c07b | — |
| storage.modifier.lifetime.rust | #bebebe | — |
| support.function.std.rust | #db7340 | — |
| entity.name.lifetime.rust | #e5c07b | — |
| variable.language.rust | #6793b8 | — |
| support.constant.edge | #9d6bab | — |
| constant.other.character-class.regexp | #6793b8 | — |
| keyword.operator.quantifier.regexp | #bebebe | — |
| punctuation.definition.string.begin,punctuation.definition.string.end | #6f9f65 | — |
| variable.parameter.function | #bebebe | — |
| comment markup.link | #7f848e | — |
| markup.changed.diff | #e5c07b | — |
| meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff | #db7340 | — |
| markup.inserted.diff | #6f9f65 | — |
| markup.deleted.diff | #6793b8 | — |
| meta.function.c,meta.function.cpp | #6793b8 | — |
| 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 | #bebebe | — |
| punctuation.separator.key-value | #bebebe | — |
| keyword.operator.expression.import | #db7340 | — |
| support.constant.math | #e5c07b | — |
| support.constant.property.math | #bebebe | — |
| variable.other.constant | #e5c07b | — |
| storage.type.annotation.java, storage.type.object.array.java | #e5c07b | — |
| source.java | #6793b8 | — |
| 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 | #bebebe | — |
| meta.method.java | #db7340 | — |
| storage.modifier.import.java,storage.type.java,storage.type.generic.java | #e5c07b | — |
| keyword.operator.instanceof.java | #9d6bab | — |
| meta.definition.variable.name.java | #6793b8 | — |
| keyword.operator.logical | #bebebe | — |
| keyword.operator.bitwise | #bebebe | — |
| keyword.operator.channel | #bebebe | — |
| support.constant.property-value.scss,support.constant.property-value.css | #bebebe | — |
| keyword.operator.css,keyword.operator.scss,keyword.operator.less | #bebebe | — |
| support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss | #bebebe | — |
| punctuation.separator.list.comma.css | #bebebe | — |
| support.constant.color.w3c-standard-color-name.css | #bebebe | — |
| support.type.vendored.property-name.css | #bebebe | — |
| support.module.node,support.type.object.module,support.module.node | #e5c07b | — |
| entity.name.type.module | #e5c07b | — |
| variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node | #6793b8 | — |
| support.constant.json | #bebebe | — |
| keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof | #9d6bab | — |
| support.type.object.console | #6793b8 | — |
| support.variable.property.process | #bebebe | — |
| entity.name.function,support.function.console | #db7340 | — |
| keyword.operator.misc.rust | #bebebe | — |
| keyword.operator.sigil.rust | #9d6bab | — |
| keyword.operator.delete | #9d6bab | — |
| support.type.object.dom | #bebebe | — |
| support.variable.dom,support.variable.property.dom | #6793b8 | — |
| keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational | #bebebe | — |
| 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 | #9d6bab | — |
| punctuation.separator.delimiter | #bebebe | — |
| punctuation.separator.c,punctuation.separator.cpp | #9d6bab | — |
| support.type.posix-reserved.c,support.type.posix-reserved.cpp | #bebebe | — |
| keyword.operator.sizeof.c,keyword.operator.sizeof.cpp | #9d6bab | — |
| variable.parameter.function.language.python | #bebebe | — |
| support.type.python | #bebebe | — |
| keyword.operator.logical.python | #9d6bab | — |
| variable.parameter.function.python | #bebebe | — |
| punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python | #bebebe | — |
| meta.function-call.generic.python | #db7340 | — |
| constant.character.format.placeholder.other.python | #bebebe | — |
| keyword.operator | #bebebe | — |
| keyword.operator.assignment.compound | #9d6bab | — |
| keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts | #bebebe | — |
| keyword | #9d6bab | — |
| entity.name.namespace | #e5c07b | — |
| variable | #6793b8 | — |
| variable.c | #bebebe | — |
| variable.language | #e5c07b | — |
| token.variable.parameter.java | #bebebe | — |
| import.storage.java | #e5c07b | — |
| token.package.keyword | #9d6bab | — |
| token.package | #bebebe | — |
| entity.name.function, meta.require, support.function.any-method, variable.function | #db7340 | — |
| entity.name.type.namespace | #e5c07b | — |
| support.class, entity.name.type.class | #e5c07b | — |
| entity.name.class.identifier.namespace.type | #e5c07b | — |
| entity.name.class, variable.other.class.js, variable.other.class.ts | #e5c07b | — |
| variable.other.class.php | #6793b8 | — |
| entity.name.type | #e5c07b | — |
| keyword.control | #9d6bab | — |
| control.elements, keyword.operator.less | #bebebe | — |
| keyword.other.special-method | #db7340 | — |
| storage | #9d6bab | — |
| token.storage | #9d6bab | — |
| 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 | #9d6bab | — |
| token.storage.type.java | #e5c07b | — |
| support.function | #bebebe | — |
| support.type.property-name | #bebebe | — |
| support.constant.property-value | #bebebe | — |
| support.constant.font-name | #bebebe | — |
| meta.tag | #bebebe | — |
| string | #6f9f65 | — |
| entity.other.inherited-class | #e5c07b | — |
| constant.other.symbol | #bebebe | — |
| constant.numeric | #bebebe | — |
| constant | #bebebe | — |
| punctuation.definition.constant | #bebebe | — |
| entity.name.tag | #6793b8 | — |
| entity.other.attribute-name | #bebebe | — |
| entity.other.attribute-name.id | #db7340 | normal |
| entity.other.attribute-name.class.css | #bebebe | normal |
| meta.selector | #9d6bab | — |
| markup.heading | #6793b8 | — |
| markup.heading punctuation.definition.heading, entity.name.section | #db7340 | — |
| keyword.other.unit | #6793b8 | — |
| markup.bold,todo.bold | #bebebe | — |
| punctuation.definition.bold | #e5c07b | — |
| markup.italic, punctuation.definition.italic,todo.emphasis | #9d6bab | — |
| emphasis md | #9d6bab | — |
| entity.name.section.markdown | #6793b8 | — |
| punctuation.definition.heading.markdown | #6793b8 | — |
| punctuation.definition.list.begin.markdown | #6793b8 | — |
| markup.heading.setext | #bebebe | — |
| punctuation.definition.bold.markdown | #bebebe | — |
| markup.inline.raw.markdown | #6f9f65 | — |
| markup.inline.raw.string.markdown | #6f9f65 | — |
| punctuation.definition.list.markdown | #6793b8 | — |
| punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown | #6793b8 | — |
| beginning.punctuation.definition.list.markdown | #6793b8 | — |
| punctuation.definition.metadata.markdown | #6793b8 | — |
| markup.underline.link.markdown,markup.underline.link.image.markdown | #9d6bab | — |
| string.other.link.title.markdown,string.other.link.description.markdown | #db7340 | — |
| string.regexp | #bebebe | — |
| constant.character.escape | #bebebe | — |
| punctuation.section.embedded, variable.interpolation | #6793b8 | — |
| punctuation.section.embedded.begin,punctuation.section.embedded.end | #9d6bab | — |
| invalid.illegal | #ffffff | — |
| invalid.illegal.bad-ampersand.html | #bebebe | — |
| invalid.broken | #ffffff | — |
| invalid.deprecated | #ffffff | — |
| invalid.unimplemented | #ffffff | — |
| source.json meta.structure.dictionary.json > string.quoted.json | #6793b8 | — |
| source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string | #6793b8 | — |
| 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 | #6f9f65 | — |
| source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json | #bebebe | — |
| support.type.property-name.json | #6793b8 | — |
| support.type.property-name.json punctuation | #6793b8 | — |
| text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade | #9d6bab | — |
| text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade | #9d6bab | — |
| support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php | #e5c07b | — |
| keyword.operator.error-control.php | #9d6bab | — |
| keyword.operator.type.php | #9d6bab | — |
| punctuation.section.array.begin.php | #bebebe | — |
| punctuation.section.array.end.php | #bebebe | — |
| invalid.illegal.non-null-typehinted.php | #f44747 | — |
| storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php | #e5c07b | — |
| meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php | #db7340 | — |
| 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 | #bebebe | — |
| support.constant.core.rust | #bebebe | — |
| support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php | #bebebe | — |
| entity.name.goto-label.php,support.other.php | #db7340 | — |
| keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php | #bebebe | — |
| keyword.operator.regexp.php | #9d6bab | — |
| keyword.operator.comparison.php | #bebebe | — |
| keyword.operator.heredoc.php,keyword.operator.nowdoc.php | #9d6bab | — |
| meta.function.decorator.python | #db7340 | — |
| support.token.decorator.python,meta.function.decorator.identifier.python | #bebebe | — |
| function.parameter | #bebebe | — |
| function.brace | #bebebe | — |
| function.parameter.ruby, function.parameter.cs | #bebebe | — |
| constant.language.symbol.ruby | #bebebe | — |
| rgb-value | #bebebe | — |
| inline-color-decoration rgb-value | #bebebe | — |
| less rgb-value | #bebebe | — |
| selector.sass | #6793b8 | — |
| support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx | #e5c07b | — |
| block.scope.end,block.scope.begin | #bebebe | — |
| storage.type.cs | #e5c07b | — |
| entity.name.variable.local.cs | #6793b8 | — |
| token.info-token | #db7340 | — |
| token.warn-token | #bebebe | — |
| token.error-token | #f44747 | — |
| token.debug-token | #9d6bab | — |
| punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded | #9d6bab | — |
| meta.template.expression | #bebebe | — |
| keyword.operator.module | #9d6bab | — |
| support.type.type.flowtype | #db7340 | — |
| support.type.primitive | #e5c07b | — |
| meta.property.object | #6793b8 | — |
| variable.parameter.function.js | #6793b8 | — |
| keyword.other.template.begin | #6f9f65 | — |
| keyword.other.template.end | #6f9f65 | — |
| keyword.other.substitution.begin | #6f9f65 | — |
| keyword.other.substitution.end | #6f9f65 | — |
| keyword.operator.assignment | #bebebe | — |
| keyword.operator.assignment.go | #e5c07b | — |
| keyword.operator.arithmetic.go, keyword.operator.address.go | #9d6bab | — |
| entity.name.package.go | #e5c07b | — |
| support.type.prelude.elm | #bebebe | — |
| support.constant.elm | #bebebe | — |
| punctuation.quasi.element | #9d6bab | — |
| constant.character.entity | #6793b8 | — |
| entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class | #bebebe | — |
| entity.global.clojure | #e5c07b | — |
| meta.symbol.clojure | #6793b8 | — |
| constant.keyword.clojure | #bebebe | — |
| meta.arguments.coffee, variable.parameter.function.coffee | #6793b8 | — |
| source.ini | #6f9f65 | — |
| meta.scope.prerequisites.makefile | #6793b8 | — |
| source.makefile | #e5c07b | — |
| storage.modifier.import.groovy | #e5c07b | — |
| meta.method.groovy | #db7340 | — |
| meta.definition.variable.name.groovy | #6793b8 | — |
| meta.definition.class.inherited.classes.groovy | #6f9f65 | — |
| support.variable.semantic.hlsl | #e5c07b | — |
| 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 | #9d6bab | — |
| text.variable, text.bracketed | #6793b8 | — |
| support.type.swift, support.type.vb.asp | #e5c07b | — |
| entity.name.function.xi | #e5c07b | — |
| entity.name.class.xi | #bebebe | — |
| constant.character.character-class.regexp.xi | #6793b8 | — |
| constant.regexp.xi | #9d6bab | — |
| keyword.control.xi | #bebebe | — |
| invalid.xi | #bebebe | — |
| beginning.punctuation.definition.quote.markdown.xi | #6f9f65 | — |
| beginning.punctuation.definition.list.markdown.xi | #7f848e | — |
| constant.character.xi | #db7340 | — |
| accent.xi | #db7340 | — |
| wikiword.xi | #bebebe | — |
| constant.other.color.rgb-value.xi | #ffffff | — |
| punctuation.definition.tag.xi | #7f848e | — |
| entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition | #e5c07b | — |
| entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown | #6793b8 | — |
| meta.brace.square | #bebebe | — |
| comment, punctuation.definition.comment | #7f848e | italic |
| markup.quote.markdown | #7f848e | — |
| punctuation.definition.block.sequence.item.yaml | #bebebe | — |
| constant.language.symbol.elixir | #bebebe | — |
| entity.other.attribute-name.js,entity.other.attribute-name.ts,entity.other.attribute-name.jsx,entity.other.attribute-name.tsx,variable.parameter,variable.language.super | — | italic |
| comment.line.double-slash,comment.block.documentation | — | italic |
| keyword.control.import.python,keyword.control.flow.python | — | italic |
| markup.italic.markdown | — | italic |
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, markup.quote.markdown, meta.diff, meta.diff.header | #5f6167 | — |
| meta.template.expression.js, constant.name.attribute.tag.jade, punctuation.definition.metadata.markdown, punctuation.definition.string.end.markdown, punctuation.definition.string.begin.markdown, string.quoted.double.dockerfile | #f8cf5d | — |
| variable, property, support.class, keyword.operator, support.constant, support.variable, entity.name.tag.yaml, constant.character.entity.html, source.css entity.name.tag.reference, beginning.punctuation.definition.list.markdown, source.css entity.other.attribute-name.parent-selector, meta.structure.dictionary.json support.type.property-name | #5FA5DB | — |
| markup.bold, constant, constant.numeric, meta.group.regexp, constant.other.php, support.constant.ext.php, constant.other.class.php, support.constant.core.php, fenced_code.block.language, constant.other.caps.python, entity.other.attribute-name, support.type.exception.python, source.css keyword.other.unit | #f39c12 | — |
| markup.list, text.xml string, entity.name.type, support.function, entity.other.attribute-name, meta.at-rule.extend, entity.name.function, entity.other.inherited-class, entity.other.keyframe-offset.css, text.html.markdown string.quoted, meta.function-call.generic.python, meta.at-rule.extend support.constant, entity.other.attribute-name.class.jade, source.css entity.other.attribute-name, text.xml punctuation.definition.string | #f8b55d | — |
| markup.heading, variable.language.this.js, variable.language.special.self.python | #00fff2 | — |
| punctuation.definition.interpolation, punctuation.section.embedded.end.php, punctuation.section.embedded.end.ruby, punctuation.section.embedded.begin.php, punctuation.section.embedded.begin.ruby, punctuation.definition.template-expression, entity.name.tag | #f92672 | — |
| storage, storage.type, support.type, support.class, keyword, meta.link, meta.image, markup.italic, source.js support.type | #bd6bf8 | — |
| string.regexp, markup.changed | #3A75C4 | — |
| source.css support.function, source.php support.function, support.function.magic.python, entity.other.attribute-name.id, markup.deleted | #f85353 | — |
| string, text.html.php string, markup.inline.raw, markup.inserted, source.dockerfile, text.html.markdown string, punctuation.definition.string, punctuation.definition.markdown, text.html meta.embedded source.js string, text.html.php punctuation.definition.string, text.html meta.embedded source.js punctuation.definition.string, text.html punctuation.definition.string, text.html string | #8cab5a | — |
| variable.parameter.ts, entity.name.type.ts | — | italic |
| comment, markup.quote.markdown, meta.diff, meta.diff.header | #5f6167 | — |
| meta.template.expression.js, constant.name.attribute.tag.jade, punctuation.definition.metadata.markdown, punctuation.definition.string.end.markdown, punctuation.definition.string.begin.markdown, string.quoted.double.dockerfile | #f8cf5d | — |
| variable, property, support.class, keyword.operator, support.constant, support.variable, entity.name.tag.yaml, constant.character.entity.html, source.css entity.name.tag.reference, beginning.punctuation.definition.list.markdown, source.css entity.other.attribute-name.parent-selector, meta.structure.dictionary.json support.type.property-name | #5FA5DB | — |
| markup.bold, constant, constant.numeric, meta.group.regexp, constant.other.php, support.constant.ext.php, constant.other.class.php, support.constant.core.php, fenced_code.block.language, constant.other.caps.python, entity.other.attribute-name, support.type.exception.python, source.css keyword.other.unit | #f39c12 | — |
| markup.list, text.xml string, entity.name.type, support.function, entity.other.attribute-name, meta.at-rule.extend, entity.name.function, entity.other.inherited-class, entity.other.keyframe-offset.css, text.html.markdown string.quoted, meta.function-call.generic.python, meta.at-rule.extend support.constant, entity.other.attribute-name.class.jade, source.css entity.other.attribute-name, text.xml punctuation.definition.string | #f8b55d | — |
| markup.heading, variable.language.this.js, variable.language.special.self.python | #00fff2 | — |
| punctuation.definition.interpolation, punctuation.section.embedded.end.php, punctuation.section.embedded.end.ruby, punctuation.section.embedded.begin.php, punctuation.section.embedded.begin.ruby, punctuation.definition.template-expression, entity.name.tag | #f92672 | — |
| storage, storage.type, support.type, support.class, keyword, meta.link, meta.image, markup.italic, source.js support.type | #bd6bf8 | — |
| string.regexp, markup.changed | #3A75C4 | — |
| source.css support.function, source.php support.function, support.function.magic.python, entity.other.attribute-name.id, markup.deleted | #f85353 | — |
| string, text.html.php string, markup.inline.raw, markup.inserted, source.dockerfile, text.html.markdown string, punctuation.definition.string, punctuation.definition.markdown, text.html meta.embedded source.js string, text.html.php punctuation.definition.string, text.html meta.embedded source.js punctuation.definition.string, text.html punctuation.definition.string, text.html string | #8cab5a | — |
| variable.parameter.ts, entity.name.type.ts | — | italic |
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}!`;
}
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}!`;
}
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}!`;
}
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}!`;
}