OneC Theme
Publisher: Andrei ChernyakThemes in package: 4
The color theme for Visual Studio Code
The color theme for Visual Studio Code
Full workbench mockup using this variant's colors and tokenColors.
Loading...
Workbench UI color keys from the theme JSON colors map.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| meta.embedded, source.groovy.embedded, string meta.image.inline.markdown, variable.legacy.builtin.python | #000000 | — |
| emphasis | — | italic |
| strong | — | bold |
| meta.diff.header | #000080 | — |
| comment | #008000 | — |
| constant.language | #0000FF | — |
| constant.numeric, variable.other.enummember, keyword.operator.plus.exponent, keyword.operator.minus.exponent | #098658 | — |
| constant.regexp | #811F3F | — |
| entity.name.tag | #800000 | — |
| entity.name.selector | #800000 | — |
| entity.other.attribute-name | #E50000 | — |
| entity.other.attribute-name.class.css, source.css entity.other.attribute-name.class, entity.other.attribute-name.id.css, entity.other.attribute-name.parent-selector.css, entity.other.attribute-name.parent.less, source.css entity.other.attribute-name.pseudo-class, entity.other.attribute-name.pseudo-element.css, source.css.less entity.other.attribute-name.id, entity.other.attribute-name.scss | #800000 | — |
| invalid | #CD3131 | — |
| markup.underline | — | underline |
| markup.bold | #000080 | bold |
| markup.heading | #800000 | bold |
| markup.italic | — | italic |
| markup.strikethrough | — | strikethrough |
| markup.inserted | #098658 | — |
| markup.deleted | #A31515 | — |
| markup.changed | #0451A5 | — |
| punctuation.definition.quote.begin.markdown, punctuation.definition.list.begin.markdown | #0451A5 | — |
| markup.inline.raw | #800000 | — |
| punctuation.definition.tag | #800000 | — |
| meta.preprocessor, entity.name.function.preprocessor | #0000FF | — |
| meta.preprocessor.string | #A31515 | — |
| meta.preprocessor.numeric | #098658 | — |
| meta.structure.dictionary.key.python | #0451A5 | — |
| storage | #0000FF | — |
| storage.type | #0000FF | — |
| storage.modifier, keyword.operator.noexcept | #0000FF | — |
| string, meta.embedded.assembly | #A31515 | — |
| string.comment.buffered.block.pug, string.quoted.pug, string.interpolated.pug, string.unquoted.plain.in.yaml, string.unquoted.plain.out.yaml, string.unquoted.block.yaml, string.quoted.single.yaml, string.quoted.double.xml, string.quoted.single.xml, string.unquoted.cdata.xml, string.quoted.double.html, string.quoted.single.html, string.unquoted.html, string.quoted.single.handlebars, string.quoted.double.handlebars | #0000FF | — |
| string.regexp | #811F3F | — |
| punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded | #0000FF | — |
| meta.template.expression | #000000 | — |
| support.constant.property-value, support.constant.font-name, support.constant.media-type, support.constant.media, constant.other.color.rgb-value, constant.other.rgb-value, support.constant.color | #0451A5 | — |
| support.type.vendored.property-name, support.type.property-name, source.css variable, source.coffee.embedded | #E50000 | — |
| support.type.property-name.json | #0451A5 | — |
| keyword | #0000FF | — |
| keyword.control | #0000FF | — |
| keyword.operator | #000000 | — |
| keyword.operator.new, keyword.operator.expression, keyword.operator.cast, keyword.operator.sizeof, keyword.operator.alignof, keyword.operator.typeid, keyword.operator.alignas, keyword.operator.instanceof, keyword.operator.logical.python, keyword.operator.wordlike | #0000FF | — |
| keyword.other.unit | #098658 | — |
| punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php | #800000 | — |
| support.function.git-rebase | #0451A5 | — |
| constant.sha.git-rebase | #098658 | — |
| storage.modifier.import.java, variable.language.wildcard.java, storage.modifier.package.java | #000000 | — |
| variable.language | #0000FF | — |
| entity.name.function, support.function, support.constant.handlebars, source.powershell variable.other.member, entity.name.operator.custom-literal | #795E26 | — |
| support.class, support.type, entity.name.type, entity.name.namespace, entity.other.attribute, entity.name.scope-resolution, entity.name.class, storage.type.numeric.go, storage.type.byte.go, storage.type.boolean.go, storage.type.string.go, storage.type.uintptr.go, storage.type.error.go, storage.type.rune.go, storage.type.cs, storage.type.generic.cs, storage.type.modifier.cs, storage.type.variable.cs, storage.type.annotation.java, storage.type.generic.java, storage.type.java, storage.type.object.array.java, storage.type.primitive.array.java, storage.type.primitive.java, storage.type.token.java, storage.type.groovy, storage.type.annotation.groovy, storage.type.parameters.groovy, storage.type.generic.groovy, storage.type.object.array.groovy, storage.type.primitive.array.groovy, storage.type.primitive.groovy | #267F99 | — |
| meta.type.cast.expr, meta.type.new.expr, support.constant.math, support.constant.dom, support.constant.json, entity.other.inherited-class, punctuation.separator.namespace.ruby | #267F99 | — |
| keyword.control, source.cpp keyword.operator.new, source.cpp keyword.operator.delete, keyword.other.using, keyword.other.directive.using, keyword.other.operator, entity.name.operator | #AF00DB | — |
| variable, meta.definition.variable.name, support.variable, entity.name.variable, constant.other.placeholder | #001080 | — |
| variable.other.constant, variable.other.enummember | #0070C1 | — |
| meta.object-literal.key | #001080 | — |
| support.constant.property-value, support.constant.font-name, support.constant.media-type, support.constant.media, constant.other.color.rgb-value, constant.other.rgb-value, support.constant.color | #0451A5 | — |
| punctuation.definition.group.regexp, punctuation.definition.group.assertion.regexp, punctuation.definition.character-class.regexp, punctuation.character.set.begin.regexp, punctuation.character.set.end.regexp, keyword.operator.negation.regexp, support.other.parenthesis.regexp | #D16969 | — |
| constant.character.character-class.regexp, constant.other.character-class.set.regexp, constant.other.character-class.regexp, constant.character.set.regexp | #811F3F | — |
| keyword.operator.quantifier.regexp | #000000 | — |
| keyword.operator.or.regexp, keyword.control.anchor.regexp | #EE0000 | — |
| constant.character, constant.other.option | #0000FF | — |
| constant.character.escape | #EE0000 | — |
| entity.name.label | #000000 | — |
| comment | #93A1A1 | — |
| punctuation.definition.comment | #93A1A1 | — |
| string | #4CA49C | — |
| meta.embedded.assembly | #4CA49C | — |
| keyword - keyword.operator | #D24C15 | — |
| keyword.control | #D24C15 | — |
| storage | #D24C15 | — |
| storage.type | #D24C15 | — |
| constant.numeric | #B68900 | — |
| entity.name.type | #0664A7D0 | — |
| entity.name.class | #0664A7D0 | — |
| support.type | #0664A7D0 | — |
| support.class | #0664A7D0 | — |
| entity.name.function | #0664A7D0 | — |
| support.function | #0664A7D0 | — |
| variable | #0664A7D0 | — |
| entity.name.variable | #0664A7D0 | — |
| punctuation.definition.array.begin, punctuation.definition.array.end, punctuation.definition.dictionary.begin, punctuation.definition.dictionary.end, punctuation.definition.tag, entity.name.tag, entity.other.attribute-name | #0664A7D0 | — |
| keyword, keyword.operator | #D24C15 | — |
| entity.name.type.class.tsx | #AE6900 | — |
| meta.embedded | #577572 | — |
| comment.block, comment.block.documentation, comment.line, comment.line.character, comment.line.double-dash, comment.line.double-slash, comment.line.number-sign, comment.line.percentage | #93A1A1 | — |
| source.bsl, punctuation.bracket.begin.bsl, punctuation.bracket.end.bsl | #0664A7D0 | — |
| keyword.control.sdbl, support.function.sdbl, support.type.sdbl | #546AD8 | — |
| constant.other.date.bsl | #6E6E6E | — |
| constant.language.bsl, keyword.operator.logical.bsl | #D24C15 | — |
| keyword.other.preprocessor.bsl, keyword.other.section.bsl, keyword.control.import.bsl, keyword.control.native.bsl, storage.modifier.directive.bsl, storage.type.annotation.bsl, entity.name.section.bsl | #AE6900 | — |
| source.sdbl, string.quoted.double.bsl, constant.numeric.sdbl, constant.language.sdbl, string.quoted.double.sdbl, keyword.operator.sdbl, keyword.operator.logical.sdbl, keyword.operator.comparison.sdbl, keyword.control.conditional.sdbl, keyword.operator.arithmetic.sdbl, variable.parameter.sdbl | #4CA49C | — |
| #93A1A1 | — | |
| source.xbsl, storage.modifier.import, storage.type.xbsl, variable.parameter.method.xbsl | #0664A7D0 | — |
| support.function.sql.xbsl | #546AD8 | — |
| #484545 | — | |
| constant.language.xbsl, keyword.operator.logical.xbsl | #D24C15 | — |
| keyword.control.import.xbsl | #AE6900 | — |
| keyword.control.less.xbsl, keyword.sql.xbsl, string.quoted.double.xbsl, string.other.query.xbsl, string.query.xbsl, constant.character.escape.xbsl, variable.parameter.xbsl, punctuation.definition.string.begin.bsl, punctuation.definition.string.begin.bsl | #4CA49C | — |
| #2E902E | — | |
| keyword.other.DML.II.sql, keyword.other.DML.sql, keyword.other.DDL.create.II.sql, keyword.other.LUW.sql, keyword.other.alias.sql, keyword.other.authorization.sql, keyword.other.cascade.sql, keyword.other.create.sql, keyword.other.data-integrity.sql, keyword.other.object-comments.sql, keyword.other.order.sql, keyword.other.table.sql, entity.name.function.sql | #D24C15 | — |
| string.interpolated.sql, string.other.quoted.brackets.sql, string.quoted.double.sql, string.quoted.other.backtick.sql, string.quoted.single.sql, string.regexp.modr.sql, string.regexp.sql | #4CA49C | — |
| comment.block, comment.line.double-dash.sql | #93A1A1 | — |
| source.sql, keyword.operator.comparison.sql, keyword.operator.concatenator.sql, keyword.operator.math.sql, keyword.operator.star.sql, storage.modifier.sql, storage.type.sql, constant.character.escape.slash.sql, constant.character.escape.sql, constant.numeric.sql, constant.other.database-name.sql, constant.other.table-name.sql, keyword.other.sql | #0664A7D0 | — |
| support.type.property-name.json, punctuation.separator.array.json, punctuation.separator.dictionary.pair.json.comments, punctuation.separator.dictionary.key-value.json.comments | #0664A7D0 | — |
| string.quoted.double.json | #4CA49C | — |
| constant.language.json, constant.numeric.json | #AB7700 | — |
| text.xml | #AB7700 | — |
| markup.heading | #AE6900 | — |
| markup.inline.raw | #4CA49C | — |
| markup.bold | #0F75BE | — |
| keyword.language.gherkin.feature, keyword.language.gherkin.feature.scenario | #484545 | — |
| keyword.language.gherkin.feature.step | #D24C15 | — |
| keyword.control.cucumber.table | #4CA49C | — |
| text.gherkin.feature | #0664A7D0 | — |
| keyword.control.conditional.batchfile, keyword.other.special-method.batchfile, keyword.command.batchfile, keyword.operator.logical.batchfile | #D24C15 | — |
| comment.line.colon.batchfile, comment.line.rem.batchfile | #93A1A1 | — |
| source.batchfile, keyword.command.rem.batchfile, keyword.control.repeat.batchfile, keyword.control.repeat.do.batchfile, keyword.control.repeat.in.batchfile, keyword.control.statement.batchfile, keyword.operator.arithmetic.batchfile, keyword.operator.assignment.augmented.batchfile, keyword.operator.assignment.batchfile, keyword.operator.at.batchfile, keyword.operator.comparison.batchfile, keyword.operator.conditional.batchfile, keyword.operator.pipe.batchfile, keyword.operator.redirection.batchfile | #0664A7D0 | — |
| source.shell | #0664A7D0 | — |
| source.java | #0664A7D0 | — |
| token.info-token | #316BCD | — |
| token.warn-token | #CD9731 | — |
| token.error-token | #CD3131 | — |
| token.debug-token | #800080 | — |
| comment | #93A1A1 | — |
| punctuation.definition.comment | #93A1A1 | — |
| string | #4CA49C | — |
| meta.embedded.assembly | #4CA49C | — |
| keyword - keyword.operator | #D24C15 | — |
| keyword.control | #D24C15 | — |
| storage | #D24C15 | — |
| storage.type | #D24C15 | — |
| constant.numeric | #B68900 | — |
| entity.name.type | #0664A7D0 | — |
| entity.name.class | #0664A7D0 | — |
| support.type | #0664A7D0 | — |
| support.class | #0664A7D0 | — |
| entity.name.function | #0664A7D0 | — |
| support.function | #0664A7D0 | — |
| variable | #0664A7D0 | — |
| entity.name.variable | #0664A7D0 | — |
| punctuation.definition.array.begin, punctuation.definition.array.end, punctuation.definition.dictionary.begin, punctuation.definition.dictionary.end, punctuation.definition.tag, entity.name.tag, entity.other.attribute-name | #0664A7D0 | — |
| keyword, keyword.operator | #D24C15 | — |
| entity.name.type.class.tsx | #AE6900 | — |
| meta.embedded | #577572 | — |
| comment.block, comment.block.documentation, comment.line, comment.line.character, comment.line.double-dash, comment.line.double-slash, comment.line.number-sign, comment.line.percentage | #93A1A1 | — |
| source.bsl, punctuation.bracket.begin.bsl, punctuation.bracket.end.bsl | #0664A7D0 | — |
| keyword.control.sdbl, support.function.sdbl, support.type.sdbl | #546AD8 | — |
| constant.other.date.bsl | #6E6E6E | — |
| constant.language.bsl, keyword.operator.logical.bsl, storage.modifier.bsl | #D24C15 | — |
| keyword.other.preprocessor.bsl, keyword.other.section.bsl, keyword.control.import.bsl, keyword.control.native.bsl, storage.modifier.directive.bsl, storage.type.annotation.bsl, entity.name.section.bsl | #AE6900 | — |
| source.sdbl, string.quoted.double.bsl, constant.numeric.sdbl, constant.language.sdbl, string.quoted.double.sdbl, keyword.operator.sdbl, keyword.operator.logical.sdbl, keyword.operator.comparison.sdbl, keyword.control.conditional.sdbl, keyword.operator.arithmetic.sdbl, variable.parameter.sdbl | #4CA49C | — |
| #93A1A1 | — | |
| source.xbsl, storage.modifier.import, storage.type.xbsl, variable.parameter.method.xbsl | #0664A7D0 | — |
| support.function.sql.xbsl | #546AD8 | — |
| #484545 | — | |
| constant.language.xbsl, keyword.operator.logical.xbsl | #D24C15 | — |
| keyword.control.import.xbsl | #AE6900 | — |
| keyword.control.less.xbsl, keyword.sql.xbsl, string.quoted.double.xbsl, string.other.query.xbsl, string.query.xbsl, constant.character.escape.xbsl, variable.parameter.xbsl, punctuation.definition.string.begin.bsl, punctuation.definition.string.begin.bsl, constant.character.escape.bsl | #4CA49C | — |
| #2E902E | — | |
| keyword.other.DML.II.sql, keyword.other.DML.sql, keyword.other.DDL.create.II.sql, keyword.other.LUW.sql, keyword.other.alias.sql, keyword.other.authorization.sql, keyword.other.cascade.sql, keyword.other.create.sql, keyword.other.data-integrity.sql, keyword.other.object-comments.sql, keyword.other.order.sql, keyword.other.table.sql, entity.name.function.sql | #D24C15 | — |
| string.interpolated.sql, string.other.quoted.brackets.sql, string.quoted.double.sql, string.quoted.other.backtick.sql, string.quoted.single.sql, string.regexp.modr.sql, string.regexp.sql | #4CA49C | — |
| comment.block, comment.line.double-dash.sql | #93A1A1 | — |
| source.sql, keyword.operator.comparison.sql, keyword.operator.concatenator.sql, keyword.operator.math.sql, keyword.operator.star.sql, storage.modifier.sql, storage.type.sql, constant.character.escape.slash.sql, constant.character.escape.sql, constant.numeric.sql, constant.other.database-name.sql, constant.other.table-name.sql, keyword.other.sql | #0664A7D0 | — |
| support.type.property-name.json, punctuation.definition.array.begin.json, punctuation.definition.array.end.json, punctuation.definition.dictionary.begin.json, punctuation.definition.dictionary.end.json, punctuation.definition.string.begin.json, punctuation.definition.string.end.json, punctuation.separator.array.json, punctuation.separator.dictionary.key-value.json, punctuation.separator.dictionary.pair.json, punctuation.support.type.property-name.begin.json, punctuation.support.type.property-name.end.json | #0664A7D0 | — |
| string.quoted.double.json | #4CA49C | — |
| constant.character.escape.json, constant.language.json, constant.numeric.json | #AB7700 | — |
| punctuation.definition.tag.xml, entity.name.tag.xml, entity.name.tag.localname.xml, entity.other.attribute-name.xml, entity.other.attribute-name.localname.xml | #0664A7D0 | — |
| string.quoted.double.xml, string.unquoted.cdata.xml | #4CA49C | — |
| text.xml, constant.character.entity.xml, variable.language.documentroot.xml, variable.language.entity.xml | #AB7700 | — |
| markup.heading.markdown, string.other.link.title.markdown, punctuation.definition.link.title.begin.markdown, punctuation.definition.link.title.end.markdown, markup.inline.raw.string.markdown | #AE6900 | — |
| markup.inline.raw | #4CA49C | — |
| markup.bold | #0F75BE | — |
| keyword.language.gherkin.feature, keyword.language.gherkin.feature.scenario | #484545 | — |
| keyword.language.gherkin.feature.step | #D24C15 | — |
| keyword.control.cucumber.table | #4CA49C | — |
| text.gherkin.feature | #0664A7D0 | — |
| keyword.control.conditional.batchfile, keyword.other.special-method.batchfile, keyword.command.batchfile, keyword.operator.logical.batchfile | #D24C15 | — |
| comment.line.colon.batchfile, comment.line.rem.batchfile | #93A1A1 | — |
| source.batchfile, keyword.command.rem.batchfile, keyword.control.repeat.batchfile, keyword.control.repeat.do.batchfile, keyword.control.repeat.in.batchfile, keyword.control.statement.batchfile, keyword.operator.arithmetic.batchfile, keyword.operator.assignment.augmented.batchfile, keyword.operator.assignment.batchfile, keyword.operator.at.batchfile, keyword.operator.comparison.batchfile, keyword.operator.conditional.batchfile, keyword.operator.pipe.batchfile, keyword.operator.redirection.batchfile | #0664A7D0 | — |
| source.shell, keyword.control.powershell, keyword.other.powershell, keyword.other.array.begin.powershell, keyword.other.hashtable.begin.powershell, storage.type.powershell, entity.name.command.shell, constant.other.option, constant.character.escape.powershell, constant.numeric.integer.shell, variable.language.special.shell, variable.language.powershell, variable.other.member.powershell, keyword.operator.pattern.case.shell, constant.character.escape.shell, punctuation.section.embedded.substatement.begin.powershell, interpolated.complex.source.powershell, storage.modifier.declare.shell, storage.modifier.local.shell | #0664A7D0 | — |
| string.unquoted.argument.shell, string.unquoted.shell, string.regexp.unquoted.shell, constant.numeric.integer.powershell, constant.numeric.hex.powershell, constant.character.escape.ansi-c.shell | #4CA49C | — |
| source.shell | #0664A7D0 | — |
| punctuation.definition.anchor.yaml, punctuation.definition.alias.yaml, punctuation.definition.block.sequence.item.yaml, punctuation.definition.directive.begin.yaml, punctuation.definition.key-value.begin.yaml, punctuation.definition.mapping.begin.yaml, punctuation.definition.mapping.end.yaml, punctuation.definition.sequence.begin.yaml, punctuation.definition.sequence.end.yaml, punctuation.definition.string.begin.yaml, punctuation.definition.string.end.yaml, punctuation.separator.map.value.yaml, punctuation.separator.key-value.mapping.yaml, punctuation.separator.mapping.yaml, punctuation.separator.sequence.yaml, punctuation.whitespace.comment.leading.yaml | #0664A7D0 | — |
| punctuation.definition.comment.yaml | #93A1A1 | — |
| constant.character.escape.single-quote.yaml, constant.character.escape.unicode.16-bit.yaml, constant.character.escape.unicode.32-bit.yaml, constant.character.escape.unicode.8-bit.yaml, constant.character.escape.yaml, constant.language.boolean.yaml, constant.language.null.yaml, constant.numeric.float.inf.yaml, constant.numeric.float.nan.yaml, constant.numeric.float.yaml, constant.numeric.indentation-indicator.yaml, constant.numeric.integer.decimal.yaml, constant.numeric.integer.hexadecimal.yaml, constant.numeric.integer.octal.yaml, constant.numeric.yaml-version.yaml, string.unquoted.plain.out.yaml, string.quoted.single.yaml, string.unquoted.block.yaml, string.unquoted.plain.in.yaml | #4CA49C | — |
| text.log | #0664A7D0 | — |
| log.debug, log.info | #4EB0E9 | — |
| log.warning | #C8A219 | — |
| log.error, log.exception | #E25734 | — |
| log.constant, log.date | #4CA49C | — |
| punctuation.definition.comment.begin.js, punctuation.definition.comment.end.js, punctuation.definition.comment.html, punctuation.definition.comment.js | #93A1A1 | — |
| string.other.inline-data.html, string.quoted.double.html, string.quoted.single.html, string.unquoted.html, text.html.basic, text.html.derivative | #4CA49C | — |
| text.html.jinja, keyword.control.jinja, variable.other.jinja | #93A1A1 | — |
| punctuation.definition.entity.html, punctuation.definition.string.begin.html, punctuation.definition.string.end.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html, punctuation.definition.tag.html, punctuation.separator.key-value.html, punctuation.whitespace.comment.leading.js, punctuation.whitespace.embedded.leading.html, punctuation.whitespace.embedded.trailing.html | #0664A7D0 | — |
| entity.name.function.namespace-prefix.css, entity.name.tag.css, entity.name.tag.custom.css, entity.name.tag.wildcard.css, entity.other.attribute-name.class.css, entity.other.attribute-name.css, entity.other.attribute-name.id.css, entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css, entity.other.keyframe-offset.css, entity.other.keyframe-offset.percentage.css, entity.other.namespace-prefix.css | #D24C15 | — |
| constant.character.escape.codepoint.css, constant.character.escape.css, constant.character.escape.newline.css, constant.numeric.css, constant.numeric.other.density.css, constant.other.color.rgb-value.hex.css, constant.other.unicode-range.css, support.constant.color.current.css, support.constant.color.w3c-extended-color-name.css, support.constant.color.w3c-standard-color-name.css, support.constant.font-name.css, support.constant.language-range.css, support.constant.media.css, support.constant.parity.css, support.constant.property-value.css, support.constant.property-value.list-style-type.css, support.constant.step-direction.css, support.constant.text-direction.css, support.constant.vendored.property-value.css, meta.property-list.css, meta.property-list.font-feature.css, meta.property-name.css, meta.property-value.css, keyword.other.important.css, keyword.other.unit.${2:/downcase}.css, keyword.other.unit.percentage.css, keyword.other.unit.rem.css, keyword.other.unit.vw.css, keyword.other.unit.px.css, keyword.other.unit.em.css, variable.argument.css, variable.css, variable.font-feature.css, variable.parameter.document-rule.css, variable.parameter.font-name.css, variable.parameter.keyframe-list.css, variable.parameter.misc.css, variable.parameter.style-name.css, variable.parameter.url.css | #4CA49C | — |
| support.type.property-name.css, support.type.property-name.media.css, support.type.vendored.property-name.css, support.type.vendored.property-name.media.css | #0664A7D0 | — |
| keyword.control.$1.makefile, keyword.control.define.makefile, keyword.control.else.makefile, keyword.control.include.makefile, keyword.control.override.makefile, keyword.control.vpath.makefile | #D24C15 | — |
| punctuation.definition.comment.makefile, punctuation.definition.variable.makefile, punctuation.separator.delimeter.comma.makefile, punctuation.separator.key-value.makefile, punctuation.whitespace.comment.leading.makefile, variable.language.makefile, variable.other.makefile, meta.scope.condition.makefile, meta.scope.conditional.makefile, meta.scope.function-call.makefile, meta.scope.prerequisites.makefile, meta.scope.recipe.makefile, meta.scope.target.makefile | #0664A7D0 | — |
| support.function.$1.makefile, support.function.target.$1.makefile, entity.name.function.target.makefile | #4CA49C | — |
| constant.character.escape.continuation.makefile, constant.other.placeholder.makefile | #4CA49C | — |
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}!`;
}