AL Theme
AL Theme is built to make developer experience better. Here you'll get multiple popular themes combination. So, you don't have to install multiple themes. Just install Al Theme and select your favourite theme.
AL Theme is built to make developer experience better. Here you'll get multiple popular themes combination. So, you don't have to install multiple themes. Just install Al Theme and select your favourite theme.
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 |
|---|---|---|
| Global settings | #bdd2e7 | — |
| meta.property-list.css meta.property-value.css variable.other.less, meta.property-list.scss variable.scss, meta.property-list.sass variable.sass, meta.brace, keyword.operator.operator, keyword.operator.or.regexp, keyword.operator.expression.in, keyword.operator.relational, keyword.operator.assignment, keyword.operator.comparison, keyword.operator.type, keyword.operator, keyword, punctuation.definintion.string, punctuation, variable.other.readwrite.js, storage.type, source.css, string.quoted | — | normal |
| markup.changed, meta.diff.header.git, meta.diff.header.from-file, meta.diff.header.to-file | #9cd9ff | normal |
| markup.deleted.diff | #f05050 | normal |
| markup.inserted.diff | #a1d884 | normal |
| variable.language | #00b1ff | — |
| constant.character.escape | #aae682 | — |
| punctuation.definition.tag, meta.tag | #bdd2e7 | — |
| entity.other.attribute-name, entity.name.type.svelte | #9696ff | normal |
| entity.other.attribute-name.class.pug | #ffdc96 | normal |
| support.variable.property | #00dcdc | — |
| invalid.deprecated | #f05050 | — |
| string.regexp, string.regexp keyword.other, string.regexp punctuation.definition.string, constant.character.escape.backslash.regexp, constant.other.character-class.set.regexp, constant.character.control.regexp | #dbd4ba | — |
| constant.other.color | #bdd2e7 | — |
| italic | normal | |
| bold | #aae682 | bold |
| quote | #aae682 | normal |
| invalid | #ffffff | — |
| support.variable, support.type | #9696ff | — |
| support.function, support.constant | #9696ff | normal |
| variable.other.object.property | #bdd2e7 | normal |
| variable.instance, variable.other.instance, variable.readwrite.instance, variable.other.readwrite.instance | #ffb482 | — |
| variable.other.property, variable.other.property.js, variable.other.property.ts, variable.object.property.ts, support.variable.property | #bdd2e7 | — |
| support.constant.math | #ff7878 | — |
| storage.type, punctuation.definition.block.tag, meta.method.declaration, meta.method.declaration storage.type.js | #00b1ff | normal |
| storage.type.interface | #00b1ff | — |
| storage, meta.class meta.method.declaration meta.var.expr storage.type.js, storage.type.property.js, storage.type.property.ts, storage.type.property.tsx | #00b1ff | normal |
| entity.name.tag.custom | #dc8cff | — |
| meta.delimiter.period | #dc8cff | normal |
| meta.selector | #dc8cff | normal |
| entity.name.tag.doctype, meta.tag.sgml.doctype | #dc8cff | normal |
| keyword.control.conditional.js, keyword.control.conditional.ts, keyword.control.switch.js, keyword.control.switch.ts, keyword.control.conditional.svelte, keyword.control.svelte | #dc8cff | normal |
| keyword.control.loop.vue, keyword.control.conditional.vue | #dc8cff | — |
| keyword.control | #9696ff | — |
| variable.parameter.function | #00dcdc | normal |
| meta.function-call | — | normal |
| meta.property-name | #00dcdc | — |
| keyword.control.operator | #00dcdc | — |
| entity.name.function | #00dcdc | — |
| support.constant, keyword.other.special-method, keyword.other.new, keyword.other.debugger | #00dcdc | — |
| meta.var.expr, meta.object-literal.key | #bdd2e7 | normal |
| variable | #ffdc96 | normal |
| constant.language, punctuation.definition.constant, variable.other.constant | #ffdc96 | — |
| constant.character, constant.other | #ffdc96 | — |
| entity.name.class, meta.class entity.name.type.class, meta.class entity.name.type.class.js, entity.other.inherited-class.js, meta.class entity.name.type.class.ts | #dc8cff | — |
| entity.other.inherited-class | #ffdc96 | — |
| string | #aae682 | — |
| string.quoted, string.quoted.single.js | #aae682 | — |
| string.template punctuation.definition.string | #aae682 | — |
| punctuation.definition.string | #aae682 | — |
| punctuation, punctuation.separator, meta.property-list.css.sass, punctuation.accessor, punctuation.accessor | #bdd2e7 | — |
| punctuation.terminator.expression, punctuation.definition.arguments, punctuation.definition.array, punctuation.section.array, meta.array | #bdd2e7 | — |
| punctuation.definition.list.begin, punctuation.definition.list.end, punctuation.separator.arguments, punctuation.definition.list | #bdd2e7 | — |
| punctuation.definition.string.markdown, punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, meta.link.inline.markdown punctuation.definition.string | #bdd2e7 | — |
| meta.import.ts punctuation.definition.block, meta.import.tsx punctuation.definition.block, meta.export.ts punctuation.definition.block, meta.export.tsx punctuation.definition.block | #bdd2e7 | — |
| meta.brace, punctuation.definition, punctuation.definition.parameters | #bdd2e7 | — |
| punctuation.definition.template-expression | #ff7878 | — |
| keyword.operator | #ff7878 | normal |
| keyword.operator.expression | #ff7878 | — |
| keyword.operator.assignment | #ff7878 | — |
| keyword.operator.arithmetic | #ff7878 | — |
| keyword.operator.bitwise | #ff7878 | — |
| keyword.operator.increment, keyword.operator.decrement | #ff7878 | — |
| keyword.operator.ternary | #ff7878 | — |
| keyword.operator.logical | #dc8cff | normal |
| keyword.operator.comparison | #dc8cff | — |
| keyword.operator.relational | #dc8cff | normal |
| comment, comment.block.documentation punctuation.definition.bracket.curly | #647882 | italic |
| comment.line.double-slash, punctuation.definition.comment, punctuation.whitespace.comment, string.comment.buffered.block.pug | #647882 | italic |
| comment.block.documentation entity.name.type.instance.jsdoc, comment.block.documentation entity.name.type.instance.phpdoc | #9696ff80 | — |
| comment.block.documentation variable.other.jsdoc, comment.block.documentation variable.other.phpdoc | #ffdc9680 | — |
| comment.block.documentation storage.type.class.jsdoc, comment.block.documentation punctuation.definition.block.tag.jsdoc | #00b1ff80 | — |
| constant.numeric, constant.character.numeric | #ffb482 | normal |
| constant.language.null, constant.language.undefined | #ff7878 | — |
| constant.language.boolean | #ff7878 | — |
| variable.scss, variable.sass, variable.parameter.scss, variable.parameter.sass | #ffdc96 | — |
| entity.other.attribute-name.id, entity.other.attribute-name.id.css, entity.other.attribute-name.id.css punctuation.definition.entity.css, entity.other.attribute-name.id.scss, entity.other.attribute-name.id.css.sass | #00b1ff | — |
| support.function.name.sass.library, source.sass entity.name.function | #00b1ff | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.class.css punctuation.definition.entity.css, entity.other.attribute-name.class.css.sass, entity.other.attribute-name.class.scss | #ffdc96 | — |
| entity.name.tag.css, entity.name.tag.less, entity.name.tag.custom.css, entity.name.tag.reference.scss, entity.name.tag.css.sass | #ff7878 | normal |
| entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-class.css punctuation.definition.entity.css, entity.other.pseudo-class.css.sass, entity.other.attribute-name.pseudo-element.css, entity.other.attribute-name.pseudo-element.css punctuation.definition.entity.css | #dc8cff | normal |
| support.type.property-name.css, support.type.property-name.css.sass | #00dcdc | — |
| support.constant.property-value.css | #ffb482 | — |
| keyword.other.unit, keyword.other.unit.css, keyword.other.unit.scss, keyword.other.unit.css.sass, constant.numeric.css, punctuation.definition.constant.css, constant.numeric.css.sass | #ffb482 | — |
| support.type.vendor.property-name, support.constant.vendor.property-value, support.type.property-name, meta.property-list entity.name.tag | #9696ff | normal |
| keyword.other.important.css, keyword.other.important.scss | #ff7878 | normal |
| meta.at-rule.keyframes.body.css, source.css.scss meta.at-rule.keyframes.scss entity.other.attribute-name.scss | #dc8cff | normal |
| punctuation.definition.keyword, entity.name.tag.reference, entity.name.tag.custom.css, entity.name.tag.custom.scss, entity.name.tag.custom.sass, support.function.sass, keyword.control.interpolation.sass, keyword.operator.css.sass, keyword.other.reserved.sass, keyword.control.at-rule, keyword.control.at-rule.css.sass | #9696ff | normal |
| punctuation.separator.key-value.css, punctuation.separator.key-value.scss, punctuation.separator.key-value.less, punctuation.separator.key-value.css.sass | #bdd2e7 | — |
| entity.name.tag.wildcard.css, entity.name.tag.wildcard.less, entity.name.tag.wildcard.scss, entity.name.tag.wildcard.sass | #00dcdc | — |
| meta.attribute-selector.css entity.other.attribute-name, meta.attribute-selector.less entity.other.attribute-name.attribute, entity.other.attribute-name.css.sass, keyword.operator.attribute-selector.css.sass, meta.attribute-selector, source.css.scss entity.other.attribute-name.attribute, meta.attribute-selector.scss, meta.attribute-selector.scss keyword.operator.scss, meta.attribute-selector.scss punctuation.definition.string.begin.scss, meta.attribute-selector.scss punctuation.definition.string.end.scss, meta.attribute-selector.scss punctuation.definition.attribute-selector.begin.bracket.square.scss, meta.attribute-selector.scss punctuation.definition.attribute-selector.end.bracket.square.scss, entity.other.attribute-selector.sass, meta.attribute-selector.css, meta.attribute-selector.css keyword.operator.pattern.css, meta.attribute-selector.css punctuation.definition.entity.begin.bracket.square.css, meta.attribute-selector.css punctuation.definition.entity.end.bracket.square.css | #aae682 | — |
| support.function.interpolation.sass, punctuation.definition.interpolation.begin.bracket.curly.scss, punctuation.definition.interpolation.end.bracket.curly.scss | #ff7878 | — |
| entity.name.type.interface.js, entity.name.type.interface.ts, entity.name.type.alias.js, entity.name.type.alias.ts, entity.name.type.js, entity.name.type.ts, entity.name.type.module.js, entity.name.type.module.ts | #dc8cff | — |
| support.variable.property.js, support.variable.property.ts | #9696ff | normal |
| storage.type.function.arrow.js, storage.type.function.arrow.ts | — | normal |
| variable.language.this.js, variable.language.this.ts | #ff7878 | — |
| meta.objectliteral.js meta.object.member.js meta.object-literal.key.js, variable.other.property.vue | #bdd2e7 | — |
| variable.other.meta.import.js, meta.import.js variable.other, variable.other.meta.export.js, meta.export.js variable.other | #ffdc96 | — |
| meta.function-call.js entity.name.function.js | — | normal |
| meta.decorator punctuation.decorator.ts, meta.decorator punctuation.decorator.tsx | #bdd2e7 | — |
| variable.other.readwrite.alias.ts, variable.other.readwrite.alias.tsx, variable.other.readwrite.ts, variable.other.readwrite.tsx, variable.other.ts, variable.other.tsx, variable.tsx, variable.ts | #ffdc96 | — |
| meta.type.parameters.ts entity.name.type, meta.type.parameters.tsx entity.name.type | #7ba5cf | — |
| variable.other.property, variable.parameter | #ffdc96 | — |
| support.class.component.js, support.class.component.tsx | #ff7878 | normal |
| punctuation.decorator.js | #00dcdc | — |
| meta.jsx.children, meta.jsx.children.js, meta.jsx.children.tsx | #bdd2e7 | — |
| punctuation.section.embedded | #bdd2e7 | — |
| entity.name.type.tsx, entity.name.type.module.tsx | #9696ff | normal |
| meta.method.declaration storage.type.ts, meta.method.declaration storage.type.tsx | #00b1ff | — |
| variable.other.object.js, variable.other.object.jsx, variable.other.object.ts, variable.other.object.tsx, variable.object.property.js, variable.object.property.jsx, support.variable.vue | #ffdc96 | — |
| variable.js, variable.other.js | #ffdc96 | — |
| entity.name.type.js, entity.name.type.module.js | #dc8cff | normal |
| support.class.js | #ffdc96 | — |
| keyword.control.flow.js, keyword.control.flow.ts, keyword.control.flow.tsx, keyword.control.import.js, keyword.control.import.ts, keyword.control.import.tsx, keyword.control.from.js, keyword.control.from.ts, keyword.control.from.tsx | #9696ff | normal |
| entity.name.tag, meta.tag.other.html, meta.tag.other.js, meta.tag.other.tsx, entity.name.tag.tsx, entity.name.tag.js, entity.name.tag, source.vue entity.name.tag.html invalid.illegal.unrecognized-tag.html, source.vue entity.name.tag.html, meta.tag.js, meta.tag.tsx, meta.tag.html, meta.tag.start.svelte, meta.tag.end.svelte, meta.tag.start.svelte keyword.control.svelte, meta.tag.end.svelte keyword.control.svelte | #ff7878 | normal |
| invalid.illegal.unrecognized-tag.html entity.name.tag, meta.tag.other.unrecognized.html entity.name.tag | #bdd2e7 | normal |
| punctuation.separator.key-value.html, punctuation.definition.tag.html | #bdd2e7 | — |
| support.type.property-name.json | #ffdc96 | — |
| support.constant.json | #ff7878 | — |
| meta.structure.dictionary.value.json string.quoted.double | #aae682 | — |
| string.quoted.double.json punctuation.definition.string.json | #aae682 | — |
| meta.structure.dictionary.json meta.structure.dictionary.value constant.language | #ff7878 | — |
| constant.language.python | #ff7878 | — |
| variable.parameter.function.python, meta.function-call.arguments.python | #9696ff | normal |
| meta.function-call.python, meta.function-call.generic.python | #00dcdc | normal |
| punctuation.python | #bdd2e7 | — |
| entity.name.function.decorator.python | #ff7878 | — |
| source.python variable.language.special | #ffdc96 | — |
| variable.assignment.coffee | #ffdc96 | — |
| variable.parameter.function.coffee | #00dcdc | — |
| meta.arguments.coffee, variable.parameter.function.coffee | #ffdc96 | — |
| variable.other.readwrite.cs | #ffdc96 | — |
| entity.name.type.class.cs, storage.type.cs | #9696ff | — |
| entity.name.type.namespace.cs | #ffdc96 | — |
| source.elixir support.type.elixir, source.elixir meta.module.elixir entity.name.class.elixir | #9696ff | — |
| source.elixir entity.name.function | #00dcdc | — |
| source.elixir constant.other.symbol.elixir, source.elixir constant.other.keywords.elixir | #9696ff | — |
| source.elixir punctuation.definition.string | #aae682 | — |
| source.elixir variable.other.readwrite.module.elixir, source.elixir variable.other.readwrite.module.elixir punctuation.definition.variable.elixir | #aae682 | — |
| source.elixir .punctuation.binary.elixir | #dc8cff | normal |
| markup.heading.markdown | #9696ff | bold |
| markup.italic.markdown | #ffb482 | normal |
| markup.bold.markdown | #ffb482 | bold |
| markup.quote.markdown | #aae682 | normal |
| markup.underline.link.markdown, markup.underline.link.image.markdown | #ffdc96 | — |
| string.other.link.title.markdown, string.other.link.description.markdown | #ffdc96 | — |
| punctuation.definition.metadata.markdown | #bdd2e7 | — |
| beginning.punctuation.definition.list.markdown | #aae682 | — |
| markup.inline.raw.string.markdown | #aae682 | — |
| source.go keyword.package.go, source.go keyword.import.go, source.go keyword.function.go, source.go keyword.type.go, source.go keyword.struct.go, source.go keyword.interface.go, source.go keyword.const.go, source.go keyword.var.go, source.go keyword.map.go, source.go keyword.channel.go, source.go keyword.control.go | #dc8cff | normal |
| source.go constant.language.go, source.go constant.other.placeholder.go | #ff7878 | — |
| meta.use.rust, meta.function.definition.rust, keyword.other.rust | #9696ff | — |
| entity.name.namespace.rust | #dc8cff | — |
| entity.name.namespace.rust | #dc8cff | — |
| punctuation.definition.attribute.rust, punctuation.brackets.attribute.rust | #ff7878 | — |
| punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php | #ff7878 | — |
| keyword.other.namespace.php, keyword.other.use.php, keyword.other.use-as.php, storage.modifier.php | #9696ff | — |
| meta.use.php, meta.use.php punctuation.separator.inheritance.php, entity.name.type.namespace.php, entity.name.type.namespace.php punctuation.separator.inheritance.php | #ffb482 | — |
| variable.other.php, variable.other.property.php, punctuation.definition.variable.php, support.class.php, entity.other.alias.php | #ffdc96 | — |
| meta.function-call.php punctuation | #bdd2e7 | normal |
| keyword.blade | #9696ff | — |
| keyword.control.directive.include.cpp punctuation.definition.directive.cpp | #9696ff | — |
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 | #5C6370 | italic |
| comment markup.link | #5C6370 | — |
| entity.name.type | #E5C07B | — |
| entity.other.inherited-class | #E5C07B | — |
| keyword | #C678DD | — |
| keyword.control | #C678DD | — |
| keyword.operator | #C678DD | — |
| keyword.other.special-method | #61AFEF | — |
| keyword.other.unit | #D19A66 | — |
| storage | #C678DD | — |
| storage.type.annotation, storage.type.primitive | #C678DD | — |
| storage.modifier.package, storage.modifier.import | #ABB2BF | — |
| constant | #D19A66 | — |
| constant.variable | #D19A66 | — |
| constant.character.escape | #56B6C2 | — |
| constant.numeric | #D19A66 | — |
| constant.other.color | #56B6C2 | — |
| constant.other.symbol | #56B6C2 | — |
| variable | #E06C75 | — |
| variable.interpolation | #BE5046 | — |
| variable.parameter | #ABB2BF | — |
| string | #98C379 | — |
| string > source, string embedded | #ABB2BF | — |
| string.regexp | #56B6C2 | — |
| string.regexp source.ruby.embedded | #E5C07B | — |
| string.other.link | #E06C75 | — |
| punctuation.definition.comment | #5C6370 | — |
| punctuation.definition.method-parameters, punctuation.definition.function-parameters, punctuation.definition.parameters, punctuation.definition.separator, punctuation.definition.seperator, punctuation.definition.array | #ABB2BF | — |
| punctuation.definition.heading, punctuation.definition.identity | #61AFEF | — |
| punctuation.definition.bold | #E5C07B | bold |
| punctuation.definition.italic | #C678DD | italic |
| punctuation.section.embedded | #BE5046 | — |
| punctuation.section.method, punctuation.section.class, punctuation.section.inner-class | #ABB2BF | — |
| support.class | #E5C07B | — |
| support.type | #56B6C2 | — |
| support.function | #56B6C2 | — |
| support.function.any-method | #61AFEF | — |
| entity.name.function | #61AFEF | — |
| entity.name.class, entity.name.type.class | #E5C07B | — |
| entity.name.section | #61AFEF | — |
| entity.name.tag | #E06C75 | — |
| entity.other.attribute-name | #D19A66 | — |
| entity.other.attribute-name.id | #61AFEF | — |
| meta.class | #E5C07B | — |
| meta.class.body | #ABB2BF | — |
| meta.method-call, meta.method | #ABB2BF | — |
| meta.definition.variable | #E06C75 | — |
| meta.link | #D19A66 | — |
| meta.require | #61AFEF | — |
| meta.selector | #C678DD | — |
| meta.separator | #ABB2BF | — |
| meta.tag | #ABB2BF | — |
| underline | — | — |
| none | #ABB2BF | — |
| invalid.deprecated | #523D14 | — |
| invalid.illegal | white | — |
| markup.bold | #D19A66 | bold |
| markup.changed | #C678DD | — |
| markup.deleted | #E06C75 | — |
| markup.italic | #C678DD | italic |
| markup.heading | #E06C75 | — |
| markup.heading punctuation.definition.heading | #61AFEF | — |
| markup.link | #56B6C2 | — |
| markup.inserted | #98C379 | — |
| markup.quote | #D19A66 | — |
| markup.raw | #98C379 | — |
| source.c keyword.operator | #C678DD | — |
| source.cpp keyword.operator | #C678DD | — |
| source.cs keyword.operator | #C678DD | — |
| source.css property-name, source.css property-value | #828997 | — |
| source.css property-name.support, source.css property-value.support | #ABB2BF | — |
| source.elixir source.embedded.source | #ABB2BF | — |
| source.elixir constant.language, source.elixir constant.numeric, source.elixir constant.definition | #61AFEF | — |
| source.elixir variable.definition, source.elixir variable.anonymous | #C678DD | — |
| source.elixir parameter.variable.function | #D19A66 | italic |
| source.elixir quoted | #98C379 | — |
| source.elixir keyword.special-method, source.elixir embedded.section, source.elixir embedded.source.empty | #E06C75 | — |
| source.elixir readwrite.module punctuation | #E06C75 | — |
| source.elixir regexp.section, source.elixir regexp.string | #BE5046 | — |
| source.elixir separator, source.elixir keyword.operator | #D19A66 | — |
| source.elixir variable.constant | #E5C07B | — |
| source.elixir array, source.elixir scope, source.elixir section | #828997 | — |
| source.gfm markup | — | — |
| source.gfm link entity | #61AFEF | — |
| source.go storage.type.string | #C678DD | — |
| source.ini keyword.other.definition.ini | #E06C75 | — |
| source.java storage.modifier.import | #E5C07B | — |
| source.java storage.type | #E5C07B | — |
| source.java keyword.operator.instanceof | #C678DD | — |
| source.java-properties meta.key-pair | #E06C75 | — |
| source.java-properties meta.key-pair > punctuation | #ABB2BF | — |
| source.js keyword.operator | #56B6C2 | — |
| source.js keyword.operator.delete, source.js keyword.operator.in, source.js keyword.operator.of, source.js keyword.operator.instanceof, source.js keyword.operator.new, source.js keyword.operator.typeof, source.js keyword.operator.void | #C678DD | — |
| source.ts keyword.operator | #56B6C2 | — |
| source.flow keyword.operator | #56B6C2 | — |
| source.json meta.structure.dictionary.json > string.quoted.json | #E06C75 | — |
| source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string | #E06C75 | — |
| 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 | #98C379 | — |
| source.json meta.structure.dictionary.json > constant.language.json, source.json meta.structure.array.json > constant.language.json | #56B6C2 | — |
| ng.interpolation | #E06C75 | — |
| ng.interpolation.begin, ng.interpolation.end | #61AFEF | — |
| ng.interpolation function | #E06C75 | — |
| ng.interpolation function.begin, ng.interpolation function.end | #61AFEF | — |
| ng.interpolation bool | #D19A66 | — |
| ng.interpolation bracket | #ABB2BF | — |
| ng.pipe, ng.operator | #ABB2BF | — |
| ng.tag | #56B6C2 | — |
| ng.attribute-with-value attribute-name | #E5C07B | — |
| ng.attribute-with-value string | #C678DD | — |
| ng.attribute-with-value string.begin, ng.attribute-with-value string.end | #ABB2BF | — |
| source.ruby constant.other.symbol > punctuation | inherit | — |
| source.php class.bracket | #ABB2BF | — |
| source.python keyword.operator.logical.python | #C678DD | — |
| source.python variable.parameter | #D19A66 | — |
| customrule | #ABB2BF | — |
| support.type.property-name | #ABB2BF | — |
| string.quoted.double punctuation | #98C379 | — |
| support.constant | #D19A66 | — |
| support.type.property-name.json | #E06C75 | — |
| support.type.property-name.json punctuation | #E06C75 | — |
| punctuation.separator.key-value.ts, punctuation.separator.key-value.js, punctuation.separator.key-value.tsx | #56B6C2 | — |
| source.js.embedded.html keyword.operator, source.ts.embedded.html keyword.operator | #56B6C2 | — |
| variable.other.readwrite.js, variable.other.readwrite.ts, variable.other.readwrite.tsx | #ABB2BF | — |
| support.variable.dom.js, support.variable.dom.ts | #E06C75 | — |
| support.variable.property.dom.js, support.variable.property.dom.ts | #E06C75 | — |
| meta.template.expression.js punctuation.definition, meta.template.expression.ts punctuation.definition | #BE5046 | — |
| source.ts punctuation.definition.typeparameters, source.js punctuation.definition.typeparameters, source.tsx punctuation.definition.typeparameters | #ABB2BF | — |
| source.ts punctuation.definition.block, source.js punctuation.definition.block, source.tsx punctuation.definition.block | #ABB2BF | — |
| source.ts punctuation.separator.comma, source.js punctuation.separator.comma, source.tsx punctuation.separator.comma | #ABB2BF | — |
| support.variable.property.js, support.variable.property.ts, support.variable.property.tsx | #E06C75 | — |
| keyword.control.default.js, keyword.control.default.ts, keyword.control.default.tsx | #E06C75 | — |
| keyword.operator.expression.instanceof.js, keyword.operator.expression.instanceof.ts, keyword.operator.expression.instanceof.tsx | #C678DD | — |
| keyword.operator.expression.of.js, keyword.operator.expression.of.ts, keyword.operator.expression.of.tsx | #C678DD | — |
| meta.brace.round.js, meta.array-binding-pattern-variable.js, meta.brace.square.js, meta.brace.round.ts, meta.array-binding-pattern-variable.ts, meta.brace.square.ts, meta.brace.round.tsx, meta.array-binding-pattern-variable.tsx, meta.brace.square.tsx | #ABB2BF | — |
| source.js punctuation.accessor, source.ts punctuation.accessor, source.tsx punctuation.accessor | #ABB2BF | — |
| punctuation.terminator.statement.js, punctuation.terminator.statement.ts, punctuation.terminator.statement.tsx | #ABB2BF | — |
| meta.array-binding-pattern-variable.js variable.other.readwrite.js, meta.array-binding-pattern-variable.ts variable.other.readwrite.ts, meta.array-binding-pattern-variable.tsx variable.other.readwrite.tsx | #D19A66 | — |
| source.js support.variable, source.ts support.variable, source.tsx support.variable | #E06C75 | — |
| variable.other.constant.property.js, variable.other.constant.property.ts, variable.other.constant.property.tsx | #D19A66 | — |
| keyword.operator.new.ts, keyword.operator.new.j, keyword.operator.new.tsx | #C678DD | — |
| source.ts keyword.operator, source.tsx keyword.operator | #56B6C2 | — |
| punctuation.separator.parameter.js, punctuation.separator.parameter.ts, punctuation.separator.parameter.tsx | #ABB2BF | — |
| constant.language.import-export-all.js, constant.language.import-export-all.ts | #E06C75 | — |
| constant.language.import-export-all.jsx, constant.language.import-export-all.tsx | #56B6C2 | — |
| keyword.control.as.js, keyword.control.as.ts, keyword.control.as.jsx, keyword.control.as.tsx | #ABB2BF | — |
| variable.other.readwrite.alias.js, variable.other.readwrite.alias.ts, variable.other.readwrite.alias.jsx, variable.other.readwrite.alias.tsx | #E06C75 | — |
| variable.other.constant.js, variable.other.constant.ts, variable.other.constant.jsx, variable.other.constant.tsx | #D19A66 | — |
| meta.export.default.js variable.other.readwrite.js, meta.export.default.ts variable.other.readwrite.ts | #E06C75 | — |
| source.js meta.template.expression.js punctuation.accessor, source.ts meta.template.expression.ts punctuation.accessor, source.tsx meta.template.expression.tsx punctuation.accessor | #98C379 | — |
| source.js meta.import-equals.external.js keyword.operator, source.jsx meta.import-equals.external.jsx keyword.operator, source.ts meta.import-equals.external.ts keyword.operator, source.tsx meta.import-equals.external.tsx keyword.operator | #ABB2BF | — |
| entity.name.type.module.js,entity.name.type.module.ts,entity.name.type.module.jsx,entity.name.type.module.tsx | #98C379 | — |
| meta.class.js,meta.class.ts,meta.class.jsx,meta.class.tsx | #ABB2BF | — |
| meta.definition.property.js variable, meta.definition.property.ts variable, meta.definition.property.jsx variable, meta.definition.property.tsx variable | #ABB2BF | — |
| meta.type.parameters.js support.type, meta.type.parameters.jsx support.type, meta.type.parameters.ts support.type, meta.type.parameters.tsx support.type | #ABB2BF | — |
| source.js meta.tag.js keyword.operator, source.jsx meta.tag.jsx keyword.operator, source.ts meta.tag.ts keyword.operator, source.tsx meta.tag.tsx keyword.operator | #ABB2BF | — |
| meta.tag.js punctuation.section.embedded, meta.tag.jsx punctuation.section.embedded, meta.tag.ts punctuation.section.embedded, meta.tag.tsx punctuation.section.embedded | #ABB2BF | — |
| meta.array.literal.js variable, meta.array.literal.jsx variable, meta.array.literal.ts variable, meta.array.literal.tsx variable | #E5C07B | — |
| support.type.object.module.js, support.type.object.module.jsx, support.type.object.module.ts, support.type.object.module.tsx | #E06C75 | — |
| constant.language.json | #56B6C2 | — |
| variable.other.constant.object.js, variable.other.constant.object.jsx, variable.other.constant.object.ts, variable.other.constant.object.tsx | #D19A66 | — |
| storage.type.property.js, storage.type.property.jsx, storage.type.property.ts, storage.type.property.tsx | #56B6C2 | — |
| meta.template.expression.js string.quoted punctuation.definition, meta.template.expression.jsx string.quoted punctuation.definition, meta.template.expression.ts string.quoted punctuation.definition, meta.template.expression.tsx string.quoted punctuation.definition | #98C379 | — |
| meta.template.expression.js string.template punctuation.definition.string.template, meta.template.expression.jsx string.template punctuation.definition.string.template, meta.template.expression.ts string.template punctuation.definition.string.template, meta.template.expression.tsx string.template punctuation.definition.string.template | #98C379 | — |
| keyword.operator.expression.in.js, keyword.operator.expression.in.jsx, keyword.operator.expression.in.ts, keyword.operator.expression.in.tsx | #C678DD | — |
| variable.other.object.js, variable.other.object.ts | #ABB2BF | — |
| meta.object-literal.key.js, meta.object-literal.key.ts | #E06C75 | — |
| source.python constant.other | #ABB2BF | — |
| source.python constant | #D19A66 | — |
| constant.character.format.placeholder.other.python storage | #D19A66 | — |
| support.variable.magic.python | #E06C75 | — |
| meta.function.parameters.python | #D19A66 | — |
| punctuation.separator.annotation.python | #ABB2BF | — |
| punctuation.separator.parameters.python | #ABB2BF | — |
| entity.name.variable.field.cs | #E06C75 | — |
| source.cs keyword.operator | #ABB2BF | — |
| variable.other.readwrite.cs | #ABB2BF | — |
| variable.other.object.cs | #ABB2BF | — |
| variable.other.object.property.cs | #ABB2BF | — |
| entity.name.variable.property.cs | #61AFEF | — |
| storage.type.cs | #E5C07B | — |
| keyword.other.unsafe.rust | #C678DD | — |
| entity.name.type.rust | #56B6C2 | — |
| storage.modifier.lifetime.rust | #ABB2BF | — |
| entity.name.lifetime.rust | #D19A66 | — |
| storage.type.core.rust | #56B6C2 | — |
| meta.attribute.rust | #D19A66 | — |
| storage.class.std.rust | #56B6C2 | — |
| markup.raw.block.markdown | #ABB2BF | — |
| punctuation.definition.variable.shell | #E06C75 | — |
| support.constant.property-value.css | #ABB2BF | — |
| punctuation.definition.constant.css | #D19A66 | — |
| punctuation.separator.key-value.scss | #E06C75 | — |
| punctuation.definition.constant.scss | #D19A66 | — |
| meta.property-list.scss punctuation.separator.key-value.scss | #ABB2BF | — |
| storage.type.primitive.array.java | #E5C07B | — |
| entity.name.section.markdown | #E06C75 | — |
| punctuation.definition.heading.markdown | #E06C75 | — |
| markup.heading.setext | #ABB2BF | — |
| punctuation.definition.bold.markdown | #D19A66 | — |
| markup.inline.raw.markdown | #98C379 | — |
| beginning.punctuation.definition.list.markdown | #E06C75 | — |
| markup.quote.markdown | #5C6370 | italic |
| punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown | #ABB2BF | — |
| punctuation.definition.metadata.markdown | #C678DD | — |
| markup.underline.link.markdown, markup.underline.link.image.markdown | #C678DD | — |
| string.other.link.title.markdown, string.other.link.description.markdown | #61AFEF | — |
| punctuation.separator.variable.ruby | #E06C75 | — |
| variable.other.constant.ruby | #D19A66 | — |
| keyword.operator.other.ruby | #98C379 | — |
| punctuation.definition.variable.php | #E06C75 | — |
| meta.class.php | #ABB2BF | — |
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 |
|---|---|---|
| emphasis | — | italic |
| strong | — | bold |
| header | #BD93F9 | — |
| meta.diff, meta.diff.header | #6272A4 | — |
| markup.inserted | #50FA7B | — |
| markup.deleted | #FF5555 | — |
| markup.changed | #FFB86C | — |
| invalid | #FF5555 | underline italic |
| invalid.deprecated | #F8F8F2 | underline italic |
| entity.name.filename | #F1FA8C | — |
| markup.error | #FF5555 | — |
| markup.underline | — | underline |
| markup.bold | #FFB86C | bold |
| markup.heading | #BD93F9 | bold |
| markup.italic | #F1FA8C | italic |
| beginning.punctuation.definition.list.markdown, beginning.punctuation.definition.quote.markdown, punctuation.definition.link.restructuredtext | #8BE9FD | — |
| markup.inline.raw, markup.raw.restructuredtext | #50FA7B | — |
| markup.underline.link, markup.underline.link.image | #8BE9FD | — |
| meta.link.reference.def.restructuredtext, punctuation.definition.directive.restructuredtext, string.other.link.description, string.other.link.title | #FF79C6 | — |
| entity.name.directive.restructuredtext, markup.quote | #F1FA8C | italic |
| meta.separator.markdown | #6272A4 | — |
| fenced_code.block.language, markup.raw.inner.restructuredtext, markup.fenced_code.block.markdown punctuation.definition.markdown | #50FA7B | — |
| punctuation.definition.constant.restructuredtext | #BD93F9 | — |
| markup.heading.markdown punctuation.definition.string.begin, markup.heading.markdown punctuation.definition.string.end | #BD93F9 | — |
| meta.paragraph.markdown punctuation.definition.string.begin, meta.paragraph.markdown punctuation.definition.string.end | #F8F8F2 | — |
| markup.quote.markdown meta.paragraph.markdown punctuation.definition.string.begin, markup.quote.markdown meta.paragraph.markdown punctuation.definition.string.end | #F1FA8C | — |
| entity.name.type.class, entity.name.class | #8BE9FD | normal |
| keyword.expressions-and-types.swift, keyword.other.this, variable.language, variable.language punctuation.definition.variable.php, variable.other.readwrite.instance.ruby, variable.parameter.function.language.special | #BD93F9 | italic |
| entity.other.inherited-class | #8BE9FD | italic |
| comment, punctuation.definition.comment, unused.comment, wildcard.comment | #6272A4 | — |
| comment keyword.codetag.notation, comment.block.documentation keyword, comment.block.documentation storage.type.class | #FF79C6 | — |
| comment.block.documentation entity.name.type | #8BE9FD | italic |
| comment.block.documentation entity.name.type punctuation.definition.bracket | #8BE9FD | — |
| comment.block.documentation variable | #FFB86C | italic |
| constant, variable.other.constant | #BD93F9 | — |
| constant.character.escape, constant.character.string.escape, constant.regexp | #FF79C6 | — |
| entity.name.tag | #FF79C6 | — |
| entity.other.attribute-name.parent-selector | #FF79C6 | — |
| entity.other.attribute-name | #50FA7B | italic |
| entity.name.function, meta.function-call.object, meta.function-call.php, meta.function-call.static, meta.method-call.java meta.method, meta.method.groovy, support.function.any-method.lua, keyword.operator.function.infix | #50FA7B | — |
| entity.name.variable.parameter, meta.at-rule.function variable, meta.at-rule.mixin variable, meta.function.arguments variable.other.php, meta.selectionset.graphql meta.arguments.graphql variable.arguments.graphql, variable.parameter | #FFB86C | italic |
| meta.decorator variable.other.readwrite, meta.decorator variable.other.property | #50FA7B | italic |
| meta.decorator variable.other.object | #50FA7B | — |
| keyword, punctuation.definition.keyword | #FF79C6 | — |
| keyword.control.new, keyword.operator.new | — | bold |
| meta.selector | #FF79C6 | — |
| support | #8BE9FD | italic |
| support.function.magic, support.variable, variable.other.predefined | #BD93F9 | regular |
| support.function, support.type.property-name | — | regular |
| constant.other.symbol.hashkey punctuation.definition.constant.ruby, entity.other.attribute-name.placeholder punctuation, entity.other.attribute-name.pseudo-class punctuation, entity.other.attribute-name.pseudo-element punctuation, meta.group.double.toml, meta.group.toml, meta.object-binding-pattern-variable punctuation.destructuring, punctuation.colon.graphql, punctuation.definition.block.scalar.folded.yaml, punctuation.definition.block.scalar.literal.yaml, punctuation.definition.block.sequence.item.yaml, punctuation.definition.entity.other.inherited-class, punctuation.function.swift, punctuation.separator.dictionary.key-value, punctuation.separator.hash, punctuation.separator.inheritance, punctuation.separator.key-value, punctuation.separator.key-value.mapping.yaml, punctuation.separator.namespace, punctuation.separator.pointer-access, punctuation.separator.slice, string.unquoted.heredoc punctuation.definition.string, support.other.chomping-indicator.yaml, punctuation.separator.annotation | #FF79C6 | — |
| keyword.operator.other.powershell, keyword.other.statement-separator.powershell, meta.brace.round, meta.function-call punctuation, punctuation.definition.arguments.begin, punctuation.definition.arguments.end, punctuation.definition.entity.begin, punctuation.definition.entity.end, punctuation.definition.tag.cs, punctuation.definition.type.begin, punctuation.definition.type.end, punctuation.section.scope.begin, punctuation.section.scope.end, punctuation.terminator.expression.php, storage.type.generic.java, string.template meta.brace, string.template punctuation.accessor | #F8F8F2 | — |
| meta.string-contents.quoted.double punctuation.definition.variable, punctuation.definition.interpolation.begin, punctuation.definition.interpolation.end, punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded.begin, punctuation.section.embedded.coffee, punctuation.section.embedded.end, punctuation.section.embedded.end source.php, punctuation.section.embedded.end source.ruby, punctuation.definition.variable.makefile | #FF79C6 | — |
| entity.name.function.target.makefile, entity.name.section.toml, entity.name.tag.yaml, variable.other.key.toml | #8BE9FD | — |
| constant.other.date, constant.other.timestamp | #FFB86C | — |
| variable.other.alias.yaml | #50FA7B | italic underline |
| storage, meta.implementation storage.type.objc, meta.interface-or-protocol storage.type.objc, source.groovy storage.type.def | #FF79C6 | regular |
| entity.name.type, keyword.primitive-datatypes.swift, keyword.type.cs, meta.protocol-list.objc, meta.return-type.objc, source.go storage.type, source.groovy storage.type, source.java storage.type, source.powershell entity.other.attribute-name, storage.class.std.rust, storage.type.attribute.swift, storage.type.c, storage.type.core.rust, storage.type.cs, storage.type.groovy, storage.type.objc, storage.type.php, storage.type.haskell, storage.type.ocaml | #8BE9FD | italic |
| entity.name.type.type-parameter, meta.indexer.mappedtype.declaration entity.name.type, meta.type.parameters entity.name.type | #FFB86C | — |
| storage.modifier | #FF79C6 | — |
| string.regexp, constant.other.character-class.set.regexp, constant.character.escape.backslash.regexp | #F1FA8C | — |
| punctuation.definition.group.capture.regexp | #FF79C6 | — |
| string.regexp punctuation.definition.string.begin, string.regexp punctuation.definition.string.end | #FF5555 | — |
| punctuation.definition.character-class.regexp | #8BE9FD | — |
| punctuation.definition.group.regexp | #FFB86C | — |
| punctuation.definition.group.assertion.regexp, keyword.operator.negation.regexp | #FF5555 | — |
| meta.assertion.look-ahead.regexp | #50FA7B | — |
| string | #F1FA8C | — |
| punctuation.definition.string.begin, punctuation.definition.string.end | #E9F284 | — |
| punctuation.support.type.property-name.begin, punctuation.support.type.property-name.end | #8BE9FE | — |
| string.quoted.docstring.multi, string.quoted.docstring.multi.python punctuation.definition.string.begin, string.quoted.docstring.multi.python punctuation.definition.string.end, string.quoted.docstring.multi.python constant.character.escape | #6272A4 | — |
| variable, constant.other.key.perl, support.variable.property, variable.other.constant.js, variable.other.constant.ts, variable.other.constant.tsx | #F8F8F2 | — |
| meta.import variable.other.readwrite, meta.variable.assignment.destructured.object.coffee variable | #FFB86C | italic |
| meta.import variable.other.readwrite.alias, meta.export variable.other.readwrite.alias, meta.variable.assignment.destructured.object.coffee variable variable | #F8F8F2 | normal |
| meta.selectionset.graphql variable | #F1FA8C | — |
| meta.selectionset.graphql meta.arguments variable | #F8F8F2 | — |
| entity.name.fragment.graphql, variable.fragment.graphql | #8BE9FD | — |
| constant.other.symbol.hashkey.ruby, keyword.operator.dereference.java, keyword.operator.navigation.groovy, meta.scope.for-loop.shell punctuation.definition.string.begin, meta.scope.for-loop.shell punctuation.definition.string.end, meta.scope.for-loop.shell string, storage.modifier.import, punctuation.section.embedded.begin.tsx, punctuation.section.embedded.end.tsx, punctuation.section.embedded.begin.jsx, punctuation.section.embedded.end.jsx, punctuation.separator.list.comma.css, constant.language.empty-list.haskell | #F8F8F2 | — |
| source.shell variable.other | #BD93F9 | — |
| support.constant | #BD93F9 | normal |
| meta.scope.prerequisites.makefile | #F1FA8C | — |
| meta.attribute-selector.scss | #F1FA8C | — |
| punctuation.definition.attribute-selector.end.bracket.square.scss, punctuation.definition.attribute-selector.begin.bracket.square.scss | #F8F8F2 | — |
| meta.preprocessor.haskell | #6272A4 | — |
| log.error | #FF5555 | bold |
| log.warning | #F1FA8C | bold |
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, string.comment | #8b949e | — |
| constant.other.placeholder, constant.character | #ff7b72 | — |
| constant, entity.name.constant, variable.other.constant, variable.other.enummember, variable.language, entity | #79c0ff | — |
| entity.name, meta.export.default, meta.definition.variable | #ffa657 | — |
| variable.parameter.function, meta.jsx.children, meta.block, meta.tag.attributes, entity.name.constant, meta.object.member, meta.embedded.expression | #c9d1d9 | — |
| entity.name.function | #d2a8ff | — |
| entity.name.tag, support.class.component | #7ee787 | — |
| keyword | #ff7b72 | — |
| storage, storage.type | #ff7b72 | — |
| storage.modifier.package, storage.modifier.import, storage.type.java | #c9d1d9 | — |
| string, string punctuation.section.embedded source | #a5d6ff | — |
| support | #79c0ff | — |
| meta.property-name | #79c0ff | — |
| variable | #ffa657 | — |
| variable.other | #c9d1d9 | — |
| invalid.broken | #ffa198 | italic |
| invalid.deprecated | #ffa198 | italic |
| invalid.illegal | #ffa198 | italic |
| invalid.unimplemented | #ffa198 | italic |
| carriage-return | #f0f6fc | italic underline |
| message.error | #ffa198 | — |
| string variable | #79c0ff | — |
| source.regexp, string.regexp | #a5d6ff | — |
| string.regexp.character-class, string.regexp constant.character.escape, string.regexp source.ruby.embedded, string.regexp string.regexp.arbitrary-repitition | #a5d6ff | — |
| string.regexp constant.character.escape | #7ee787 | bold |
| support.constant | #79c0ff | — |
| support.variable | #79c0ff | — |
| support.type.property-name.json | #7ee787 | — |
| meta.module-reference | #79c0ff | — |
| punctuation.definition.list.begin.markdown | #ffa657 | — |
| markup.heading, markup.heading entity.name | #79c0ff | bold |
| markup.quote | #7ee787 | — |
| markup.italic | #c9d1d9 | italic |
| markup.bold | #c9d1d9 | bold |
| markup.underline | — | underline |
| markup.strikethrough | — | strikethrough |
| markup.inline.raw | #79c0ff | — |
| markup.deleted, meta.diff.header.from-file, punctuation.definition.deleted | #ffa198 | — |
| punctuation.section.embedded | #ff7b72 | — |
| markup.inserted, meta.diff.header.to-file, punctuation.definition.inserted | #7ee787 | — |
| markup.changed, punctuation.definition.changed | #ffa657 | — |
| markup.ignored, markup.untracked | #161b22 | — |
| meta.diff.range | #d2a8ff | bold |
| meta.diff.header | #79c0ff | — |
| meta.separator | #79c0ff | bold |
| meta.output | #79c0ff | — |
| brackethighlighter.tag, brackethighlighter.curly, brackethighlighter.round, brackethighlighter.square, brackethighlighter.angle, brackethighlighter.quote | #8b949e | — |
| brackethighlighter.unmatched | #ffa198 | — |
| constant.other.reference.link, string.other.link | #a5d6ff | — |
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}!`;
}