Base2tone VSCode Themes
Publisher: AtelierbramThemes in package: 40
Duotone Themes for VS Code
Duotone Themes for VS Code
Full workbench mockup using this variant's colors and tokenColors.
Loading...
Workbench UI color keys from the theme JSON colors map.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #acaab1 | italic |
| meta.embedded, source.groovy.embedded | #acaab1 | — |
| comment, punctuation.definition.comment | #515053 | italic |
| variable, string constant.other.placeholder | #855ee8 | — |
| constant.other.color | #f4f0ff | — |
| invalid, invalid.illegal | #f4f0ff | — |
| keyword, punctuation.accessor, storage.type | #b3dbff | — |
| storage.modifier, constant.keyword.clojure | #5aabf2 | — |
| punctuation, punctuation.definition.tag, punctuation.separator.inheritance.php, punctuation.definition.tag.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html, punctuation.section.embedded, meta.function punctuation.separator.comma, punctuation.definition.string, punctuation.definition.parameters, punctuation.terminator.expression, punctuation.definition.arguments, punctuation.definition.array, punctuation.section.array, punctuation.definition.list.begin, punctuation.definition.list.end, punctuation.separator.arguments, punctuation.definition.list, meta.array, source.elixir punctuation.definition.string, string.quoted.double.json punctuation.definition.string.json | #5e5c60 | — |
| keyword.control, constant.other.color, keyword.other.template, keyword.other.substitution | #8ac8ff | — |
| entity.name.tag, meta.tag.sgml, markup.deleted.git_gutter | #855ee8 | — |
| meta.function-call, variable.function, support.function, keyword.other.debugger, keyword.other.special-method, entity.name.function.clojure | #f4f0ff | — |
| meta.block variable.other | #acaab1 | — |
| support.other.variable, string.other.link | #b3dbff | — |
| constant.language, support.constant, constant.character, constant.escape, keyword.other.unit, keyword.other | #9ed2ff | — |
| constant.other.symbol, constant.other.key, entity.other.inherited-class, markup.heading, markup.inserted.git_gutter, meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js | #a17efc | normal |
| entity.name, support.type, support.class, support.orther.namespace.use.php, meta.use.php, support.other.namespace.php, markup.changed.git_gutter, support.type.sys-types | #909aa2 | — |
| support.type | #75bfff | — |
| source.css support.type.property-name, source.sass support.type.property-name, source.scss support.type.property-name, source.less support.type.property-name, source.stylus support.type.property-name, source.postcss support.type.property-name | #c5adff | — |
| entity.name.module.js, variable.import.parameter.js, variable.other.class.js | #855ee8 | — |
| variable.other.global.safer.php | #c5adff | — |
| variable.language | #b3dbff | italic |
| entity.name.method.js | #936df3 | italic |
| meta.class-method.js entity.name.function.js, variable.function.constructor, keyword.control.conditional.js, keyword.control.conditional.ts, keyword.control.switch.js, keyword.control.switch.ts | #69b5f7 | — |
| storage.type.function.arrow.js, storage.type.function.arrow.js.jsx, storage.type.function.arrow.ts, storage.type.function.arrow.tsx, storage.type.function.arrow.coffee, keyword.operator.assignment, keyword.operator.comparison | #b3dbff | — |
| entity.name.function.go, source.go keyword.control.loop.go | #f4f0ff | — |
| meta.class.ts entity.name.type.class, meta.class.tsx entity.name.type.class, meta.class meta.function-call variable.function.ts, meta.class meta.function-call variable.function.tsx, source.ts keyword.control.loop.ts, source.tsx keyword.control.loop.tsx, source.ts meta.interface.ts entity.name.type.interface.ts, source.tsx meta.interface.tsx entity.name.type.interface.tsx, source.ts meta.type.declaration.ts entity.name.type.ts, source.tsx meta.type.declaration.tsx entity.name.type.tsx | #f4f0ff | — |
| meta.method.identifier.java entity.name.function.java, meta.method.identifier.java storage.type.generic.java, meta.class meta.function-call variable.function.java, source.java keyword.control.loop.java, storage.type.function.arrow.java, meta.class.identifier.java entity.name.type.class.java | #f4f0ff | — |
| meta.method.identifier.cs entity.name.function.cs, meta.method.identifier.cs storage.type.generic.cs, meta.class meta.function-call variable.function.cs, source.cs keyword.control.loop.cs, storage.type.function.arrow.cs, meta.class.identifier.cs entity.name.type.class.cs, source.cs entity.name.function.cs, source.cs entity.name.type.class.cs | #f4f0ff | — |
| source.elixir entity.name.function.elixir, entity.name.type.module.elixir | #f4f0ff | — |
| keyword.control.flow.js, keyword.control.flow.js.jsx, keyword.control.trycatch.js, keyword.control.trycatch.js.jsx, source.js meta.group.braces.curly.js keyword.control.loop.js, source.js.jsx meta.group.braces.curly.js.jsx keyword.control.loop.js.jsx, source.js meta.export.default.js keyword.control.default.js, source.js.jsx meta.export.default.js.jsx keyword.control.default.js.jsx, keyword.control.switch.js, keyword.control.switch.js.jsx | #b3dbff | — |
| keyword.control.flow.coffee, keyword.control.trycatch.coffee, source.coffee meta.group.braces.curly.coffee keyword.control.loop.coffee, source.coffee meta.export.default.coffee keyword.control.default.coffee, keyword.control.switch.coffee | #b3dbff | — |
| keyword.control.flow.ts, keyword.control.flow.tsx, keyword.control.trycatch.ts, keyword.control.trycatch.tsx, source.ts meta.group.braces.curly.ts keyword.control.loop.ts, source.tsx meta.group.braces.curly.tsx keyword.control.loop.tsx, source.ts meta.export.default.ts keyword.control.default.ts, source.tsx meta.export.default.tsx keyword.control.default.tsx, keyword.control.switch.ts, keyword.control.switch.tsx | #b3dbff | — |
| keyword.control.flow.php, keyword.control.trycatch.php, source.php meta.group.braces.curly.php keyword.control.loop.php, keyword.control.switch.php | #b3dbff | — |
| source.shell meta.scope.while-loop.shell keyword.control.shell, source.shell meta.scope.for-in-loop.shell keyword.control.shell | #b3dbff | italic |
| source.shell meta.scope.while-loop.shell meta.scope.if-block.shell keyword.control.shell, source.shell meta.scope.for-in-loop.shell meta.scope.if-block.shell keyword.control.shell | #b3dbff | italic |
| keyword.control.flow.java, keyword.control.trycatch.java, source.java meta.group.braces.curly.java keyword.control.loop.java, keyword.control.switch.java | #b3dbff | — |
| source.cs keyword.control.flow, keyword.control.trycatch.cs, source.cs meta.group.braces.curly.cs keyword.control.loop.cs, source.cs keyword.control.switch.cs | #b3dbff | — |
| keyword.control.elixir | #b3dbff | italic |
| keyword.control.java | #b3dbff | italic |
| meta.tag.preprocessor.xml | #b3dbff | — |
| meta.tag.preprocessor.xml entity.other.attribute-name | #c8d2da | — |
| keyword.operator.assignment | #b3dbff | — |
| keyword.operator.logical.js, keyword.operator.logical.js.jsx | #b3dbff | — |
| keyword.operator.logical.coffee | #b3dbff | — |
| keyword.operator.logical.ts, keyword.operator.logical.tsx | #b3dbff | — |
| source.go keyword.operator.assignment.go | #b3dbff | normal |
| source.php keyword.operator, punctuation.separator.inheritance.php | #b3dbff | — |
| source.shell meta.scope.logical-expression.shell | #b3dbff | — |
| entity.other.attribute-name | #b294ff | italic |
| text.html.basic entity.other.attribute-name.html, text.html.basic entity.other.attribute-name | #d3c2ff | — |
| text.html.basic | #e5dbff | — |
| entity.other.attribute-name.class | #f4f0ff | — |
| source.sass keyword.control | #936df3 | — |
| markup.inserted | #6d767e | — |
| markup.deleted | #855ee8 | italic |
| markup.deleted.diff | #855ee8 | — |
| markup.inserted.diff | #6d767e | italic |
| markup.changed | #b294ff | italic |
| string.regexp | #75bfff | — |
| constant.character.escape | #75bfff | — |
| *url*, *link*, *uri* | — | underline |
| tag.decorator.js entity.name.tag.js, tag.decorator.js punctuation.definition.tag.js | #855ee8 | italic |
| source.js constant.other.object.key.js string.unquoted.label.js | #855ee8 | italic |
| support.type.property-name.json | #936df3 | — |
| support.constant.json | #6d767e | — |
| meta.structure.dictionary.value.json string.quoted.double | #8ac8ff | — |
| meta.structure.dictionary.json meta.structure.dictionary.value constant.language | #b3dbff | — |
| source.json meta.structure.dictionary.json support.type.property-name.json | #f4f0ff | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #d3c2ff | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #c5adff | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #b294ff | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #a17efc | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #936df3 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #855ee8 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #855ee8 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #855ee8 | — |
| text.html.markdown, punctuation.definition.list_item.markdown | #f4f0ff | — |
| beginning.punctuation.definition.list.markdown | #b3dbff | — |
| text.html.markdown markup.inline.raw.markdown | #b294ff | — |
| text.html.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown | #97959d | — |
| text.html.markdown meta.dummy.line-break | — | |
| markdown.heading, markup.heading | markup.heading entity.name, markup.heading.markdown punctuation.definition.heading.markdown, markup.heading1, markup.heading.markdown, entity.name, entity.name.section.markdown, heading.1.markdown | #b3dbff | — |
| markup.heading.markdown punctuation.definition.heading.markdown | #e5dbff | — |
| markup.italic.markdown | — | italic |
| markup.bold, markup.bold string | #7e8891 | bold |
| markup.bold markup.italic, markup.italic markup.bold, markup.quote markup.bold, markup.bold markup.italic string, markup.italic markup.bold string, markup.quote markup.bold string | #7e8891 | bold |
| markup.underline | #e5dbff | underline |
| markup.strike | strike | |
| markup.quote punctuation.definition.blockquote.markdown | #1e1e1f | — |
| markup.quote.markdown | #e5dbff | italic |
| beginning.punctuation.definition.quote.markdown | #3692e2 | — |
| meta.paragraph.markdown | #e5dbff | — |
| punctuation.definition.bold.markdown, punctuation.definition.italic.markdown | #d3c2ff | — |
| markup.quote | italic | |
| string.other.link.title.markdown | #b3dbff | — |
| markup.underline.link.markdown | #d3c2ff | — |
| string.other.link.description.title.markdown | #b294ff | — |
| constant.other.reference.link.markdown | #909aa2 | — |
| markup.raw.block | #b294ff | — |
| markup.raw.block.fenced.markdown | #1e1e1f50 | — |
| punctuation.definition.fenced.markdown | #1e1e1f50 | — |
| markup.raw.block.fenced.markdown, variable.language.fenced.markdown, punctuation.section.class.end | #f4f0ff | — |
| variable.language.fenced.markdown | #97959d | — |
| meta.separator | #97959d | bold |
| markup.table | #f4f0ff | — |
| token.info-token | #a17efc | — |
| token.warn-token | #7e8891 | — |
| token.error-token | #855ee8 | — |
| token.debug-token | #b294ff | — |
| string, string.quoted | #b3dbff | — |
| meta.attribute-selector.css entity.other.attribute-name.attribute, variable.other.readwrite.js | #d3c2ff | — |
| support.constant.math | #6d767e | — |
| string.regexp | #6d767e | — |
| constant.numeric, constant.character.numeric | #9ed2ff | — |
| variable.language, variable.other | #b3dbff | — |
| variable.language.this.js, variable.language.this.php | #b3dbff | italic |
| keyword | #6d767e | — |
| storage, meta.var.expr, meta.class meta.method.declaration meta.var.expr storage.type.js, storage.type.property.js, storage.type.property.ts, storage.type.property.tsx | #9ed2ff | italic |
| storage.type.class.js | #b3dbff | — |
| entity.name.class, meta.class entity.name.type.class | #e5dbff | — |
| entity.name.type | #acaab1 | |
| entity.name.function | #c5adff | — |
| punctuation.definition.variable | #acaab1 | — |
| punctuation.section.embedded.begin, punctuation.section.embedded.end | #5e5c60 | — |
| constant.language, punctuation.definition.constant, variable.other.constant, meta.preprocessor | #f4f0ff | — |
| support.function.construct, keyword.other.new | #479eeb | — |
| constant.character, constant.other | #b3dbff | — |
| constant.character.escape | #7e8891 | — |
| string.regexp, string.regexp keyword.other | #97959d | — |
| entity.other.inherited-class | #e5dbff | — |
| entity.name.tag | #f4f0ff | — |
| punctuation.definition.tag, meta.tag | #838188 | — |
| 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, meta.tag.js, meta.tag.tsx, meta.tag.html | #f4f0ff | — |
| entity.other.attribute-name | #f4f0ff | italic |
| entity.name.tag.custom | #a17efc | — |
| support.function | #d3c2ff | — |
| punctuation.separator.continuation | #855ee8 | — |
| invalid.broken | #111112 | — |
| invalid.unimplemented | #f4f0ff | — |
| invalid.illegal | #f4f0ff | — |
| support.type, support.class | #75bfff | — |
| support.variable.dom | #b3dbff | — |
| support.type.exception | #7e8891 | — |
| support.other.variable | — | — |
| invalid | #f4f0ff | — |
| invalid.deprecated | #7e8891 | — |
| keyword.operator | #75bfff | normal |
| keyword.operator.relational | #b294ff | italic |
| keyword.operator.assignment | #b3dbff | — |
| keyword.operator.arithmetic | #c5adff | — |
| keyword.operator.bitwise | #b294ff | — |
| keyword.operator.increment | #b294ff | — |
| keyword.operator.ternary | #b294ff | — |
| comment.line.double-slash | #6a686e | — |
| object | #a17efc | — |
| constant.language.null | #f4f0ff | — |
| meta.brace | #6a686e | — |
| meta.delimiter.period | #e5dbff | italic |
| constant.language.boolean | #69b5f7 | — |
| object.comma | #f4f0ff | — |
| variable.parameter.function | #75bfff | — |
| support.type.vendor.property-name, support.constant.vendor.property-value, support.type.property-name, meta.property-list entity.name.tag | #909aa2 | — |
| meta.property-list entity.name.tag.reference | #a17efc | — |
| constant.other.color.rgb-value punctuation.definition.constant | #7e8891 | — |
| meta.selector | #b294ff | italic |
| entity.other.attribute-name.id | #8ac8ff | — |
| meta.property-name | #75bfff | — |
| entity.name.tag.doctype, meta.tag.sgml.doctype | #6a686e | italic |
| keyword.control.operator | #75bfff | — |
| keyword.operator.logical | #b294ff | — |
| variable.instance, variable.other.instance, variable.readwrite.instance, variable.other.readwrite.instance, variable.other.property | #d3c2ff | — |
| variable.other.object.property | #e5dbff | italic |
| meta.function-call.js.jsx entity.name.function.js.jsx | #b294ff | — |
| variable.other.object.js, variable.other.object.jsx, variable.object.property.js, variable.object.property.jsx | #e5dbff | — |
| keyword.operator.comparison, keyword.control.flow.js, keyword.control.flow.ts, keyword.control.flow.tsx, keyword.control.ruby, keyword.control.module.ruby, keyword.control.class.ruby, keyword.control.def.ruby, keyword.control.loop.js, keyword.control.loop.ts, keyword.control.import.js, keyword.control.import.ts, keyword.control.import.tsx, keyword.control.from.js, keyword.control.from.ts, keyword.control.from.tsx | #b3dbff | italic |
| variable.interpolation | #855ee8 | — |
| support.variable.property | #75bfff | — |
| string.template meta.template.expression | #855ee8 | — |
| string.template punctuation.definition.string | #e5dbff | — |
| italic | #b294ff | italic |
| bold | #6d767e | bold |
| quote | #6a686e | italic |
| raw | #acaab1 | — |
| variable.assignment.coffee | #75bfff | — |
| variable.parameter.function.coffee | #e5dbff | — |
| variable.assignment.coffee | #6d767e | — |
| variable.other.readwrite.cs | #e5dbff | — |
| entity.name.type.class.cs, storage.type.cs | #936df3 | — |
| entity.name.type.namespace.cs | #acaab1 | — |
| entity.name.tag.css, entity.name.tag.less, entity.name.tag.custom.css, support.constant.property-value.css | #f4f0ff | — |
| entity.name.tag.wildcard.css, entity.name.tag.wildcard.less, entity.name.tag.wildcard.scss, entity.name.tag.wildcard.sass | #f4f0ff | — |
| keyword.other.unit.css, keyword.other.unit.px.css, keyword.other.unit.vw.css, keyword.other.unit.vh.css, keyword.other.unit.ch.css, keyword.other.unit.ex.css, keyword.other.unit.percentage.css, keyword.other.unit.rem.css, keyword.other.unit.em.css | #5aabf2 | — |
| keyword.control.at-rule.media.css | #9ed2ff | — |
| entity.other.attribute-name.id, punctuation.definition.entity.css | #b3dbff | — |
| source.elixir support.type.elixir, source.elixir meta.module.elixir entity.name.class.elixir | #936df3 | — |
| source.elixir entity.name.function | #6d767e | — |
| source.elixir constant.other.symbol.elixir, source.elixir constant.other.keywords.elixir | #a17efc | — |
| source.elixir variable.other.readwrite.module.elixir, source.elixir variable.other.readwrite.module.elixir punctuation.definition.variable.elixir | #6d767e | — |
| source.elixir .punctuation.binary.elixir | #b294ff | italic |
| source.go meta.function-call.go | #acaab1 | — |
| 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 | #b294ff | italic |
| source.go constant.language.go, source.go constant.other.placeholder.go | #855ee8 | — |
| meta.class entity.name.type.class, entity.global.clojure | #f4f0ff | — |
| meta.method.declaration storage.type.js, meta.symbol.clojure | #d3c2ff | — |
| terminator.js | #e5dbff | — |
| meta.js punctuation.definition.js | #e5dbff | — |
| entity.name.type.instance.jsdoc, entity.name.type.instance.phpdoc | #6a686e | — |
| variable.other.jsdoc, variable.other.phpdoc | #75bfff | — |
| variable.other.meta.import.js, meta.import.js variable.other, variable.other.meta.export.js, meta.export.js variable.other | #e5dbff | — |
| variable.parameter.function.js | #936df3 | — |
| variable.js, variable.other.js | #e5dbff | — |
| entity.name.type.js, entity.name.type.module.js | #69b5f7 | — |
| support.class.js | #e5dbff | — |
| variable.other.ruby | #e5dbff | — |
| entity.name.type.class.ruby | #c5adff | — |
| constant.language.symbol.hashkey.ruby | #936df3 | — |
| meta.attribute-selector.less entity.other.attribute-name.attribute | #a17efc | — |
| variable.other.php, variable.other.property.php | #e5dbff | — |
| support.class.php | #c5adff | — |
| meta.function-call.php punctuation | #e5dbff | — |
| variable.other.global.php | #b294ff | — |
| variable.other.global.php punctuation.definition.variable | #b294ff | — |
| constant.language.python | #b294ff | — |
| variable.parameter.function.python, meta.function-call.arguments.python | #936df3 | — |
| meta.function-call.python, meta.function-call.generic.python | #e5dbff | — |
| punctuation.python | #e5dbff | — |
| entity.name.function.decorator.python | #855ee8 | — |
| source.python variable.language.special | #936df3 | — |
| variable.scss, variable.sass, variable.parameter.url.scss, variable.parameter.url.sass | #d3c2ff | — |
| source.css.scss meta.at-rule variable, source.css.sass meta.at-rule variable | #f4f0ff | — |
| meta.attribute-selector.scss entity.other.attribute-name.attribute, meta.attribute-selector.sass entity.other.attribute-name.attribute | #936df3 | — |
| entity.name.tag.scss, entity.name.tag.sass | #f4f0ff | — |
| keyword.other.unit.scss, keyword.other.unit.sass | #479eeb | — |
| variable.other.readwrite.alias.ts, variable.other.readwrite.alias.tsx, variable.other.readwrite.ts, variable.other.readwrite.tsx, variable.other.object.ts, variable.other.object.tsx, variable.object.property.ts, variable.object.property.tsx, variable.other.ts, variable.other.tsx, variable.tsx, variable.ts | #e5dbff | — |
| entity.name.type.ts, entity.name.type.tsx | #936df3 | — |
| support.class.node.ts, support.class.node.tsx | #936df3 | — |
| meta.type.parameters.ts entity.name.type, meta.type.parameters.tsx entity.name.type | #6a686e | — |
| meta.import.ts punctuation.definition.block, meta.import.tsx punctuation.definition.block, meta.export.ts punctuation.definition.block, meta.export.tsx punctuation.definition.block | #e5dbff | — |
| meta.decorator punctuation.decorator.ts, meta.decorator punctuation.decorator.tsx | #936df3 | — |
| meta.tag.js meta.jsx.children.tsx | #936df3 | — |
| entity.name.tag.yaml | #e5dbff | — |
| variable.other.readwrite.js, variable.parameter | #e5dbff | — |
| support.class.component.js, support.class.component.tsx | #f4f0ff | — |
| meta.jsx.children, meta.jsx.children.js, meta.jsx.children.tsx | #e5dbff | — |
| entity.name.type.tsx, entity.name.type.module.tsx | #69b5f7 | — |
| meta.method.declaration storage.type.ts, meta.method.declaration storage.type.tsx | #d3c2ff | — |
| meta.diff, meta.diff.header | #e5dbff | italic |
| markup.deleted | #e5dbff | — |
| markup.changed | #e5dbff | — |
| markup.inserted | #e5dbff | — |
| markup.quote | #855ee8 | italic |
| markup.list | #e5dbff | — |
| markup.bold, markup.italic | #e5dbff | — |
| markup.inline.raw | #b3dbff | |
| markup.heading.setext | #a17efc |
TypeScript sample highlighted with this variant's colors and tokenColors.
Loading...
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}!`;
}