The Best Themes for programmers
🎨🚀 A never seen collection of 165 hand crafted themes no where to be found on Internet 💻
🎨🚀 A never seen collection of 165 hand crafted themes no where to be found on Internet 💻
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 | #707070 | — |
| keyword.operator,keyword.operator.logical,keyword.operator.relational,keyword.operator.assignment,keyword.operator.comparison,keyword.operator.ternary,keyword.operator.arithmetic,keyword.operator.spread | #CCCCCC | — |
| string,string.character.escape,string.template.quoted,string.template.quoted.punctuation,string.template.quoted.punctuation.single,string.template.quoted.punctuation.double,string.type.declaration.annotation,string.template.quoted.punctuation.tag | #6A8759 | — |
| punctuation.definition.template-expression.begin,punctuation.definition.template-expression.end | #CC8242 | — |
| expression.string,meta.template.expression | #CCCCCC | — |
| constant.numeric | #7A9EC2 | — |
| constant.language,variable.language | #CC8242 | — |
| constant.character, constant.other | #9E7BB0 | — |
| keyword,keyword.operator.new,keyword.operator.delete,keyword.operator.static,keyword.operator.this,keyword.operator.expression | #CC8242 | — |
| entity.name.type,meta.return.type,meta.type.annotation,support.type.primitive | #89A6AF | — |
| meta.type.parameters | #7A9EC2 | italic |
| storage,storage.type,storage.modifier,storage.arrow | #CC8242 | — |
| class.instance.constructor,new.expr entity.name.type | #FFC66D | — |
| support.function, entity.name.function | #FFC66D | — |
| annotation.meta.ts, annotation.meta.tsx | #CCCCCC | — |
| variable.parameter, operator.rest.parameters | #CCCCCC | — |
| variable.property,variable.other.property,variable.other.object.property,variable.object.property,support.variable.property | #9E7BB0 | — |
| quote.module | #6A8759 | — |
| markup.heading | #CC8242 | — |
| punctuation.definition.tag.html, punctuation.definition.tag.begin, punctuation.definition.tag.end, entity.name.tag | #FFC66D | — |
| entity.other.attribute-name | #CCCCCC | — |
| meta.object-literal.key, support.type.property-name.json | #9E7BB0 | — |
| storage.modifier.ts | #CC8242 | — |
| ts.cast.expr,ts.meta.entity.class.method.new.expr.cast,ts.meta.entity.type.name.new.expr.cast,ts.meta.entity.type.name.var-single-variable.annotation,tsx.cast.expr,tsx.meta.entity.class.method.new.expr.cast,tsx.meta.entity.type.name.new.expr.cast,tsx.meta.entity.type.name.var-single-variable.annotation | #7A9EC2 | — |
| ts.meta.type.support,ts.meta.type.entity.name,ts.meta.class.inherited-class,tsx.meta.type.support,tsx.meta.type.entity.name,tsx.meta.class.inherited-class,type-declaration,enum-declaration | #7A9EC2 | — |
| function-declaration,method-declaration,method-overload-declaration,type-fn-type-parameters | #FFC66D | — |
| comment.block.documentation | #6A8759 | — |
| storage.type.class.jsdoc | #CC8242 | — |
| constant.language.import-export-all | #CCCCCC | — |
| objectliteral.key.separator, punctuation.separator.key-value | #CCCCCC | — |
| regex | — | italic |
| ts.meta.entity.name.namespace,tsx.meta.entity.name.namespace | #CCCCCC | — |
| regex.character-class | #CCCCCC | — |
| entity.name.type.class | #CCCCCC | — |
| entity.other.inherited-class | #7A9EC2 | — |
| entity.name.type.instance.jsdoc | #FFC66D | — |
| yaml.entity.name,yaml.string.entity.name | #CC8242 | — |
| yaml.string.out | #CCCCCC | — |
| meta.brace.square.ts,block.support.module,block.support.type.module,block.support.function.variable,punctuation.definition.typeparameters.begin,punctuation.definition.typeparameters.end | #CCCCCC | — |
| string.regexp | #CC8242 | — |
| punctuation.definition.group.regexp,punctuation.definition.character-class.regexp | #FFC66D | — |
| constant.other.character-class.regexp, constant.character.escape.ts | #CCCCCC | — |
| expr.regex.or.operator | #CCCCCC | — |
| string.template.tag,string.template.punctuation.tag,string.quoted.punctuation.tag,string.quoted.embedded.tag, string.quoted.double.tag | #6A8759 | — |
| tag.punctuation.begin.arrow.parameters.embedded,tag.punctuation.end.arrow.parameters.embedded | #CCCCCC | — |
| object-literal.object.member.key.field.other,object-literal.object.member.key.accessor,object-literal.object.member.key.array.brace.square | #CCCCCC | — |
| property-list.property-value,property-list.constant | #A5C261 | — |
| support.type.property-name.variable.css,support.type.property-name.variable.scss,variable.scss | #7A9EC2 | — |
| entity.other.attribute-name.class.css,entity.other.attribute-name.class.scss,entity.other.attribute-name.parent-selector-suffix.css,entity.other.attribute-name.parent-selector-suffix.scss | #FFC66D | — |
| property-list.property-value.rgb-value, keyword.other.unit.css,keyword.other.unit.scss | #7A9EC2 | — |
| property-list.property-value.function | #FFC66D | — |
| support.constant.property-value.css,support.constant.property-value.scss | #A5C261 | — |
| css.entity.name.tag,scss.entity.name.tag | #CC8242 | — |
| meta.selector.css, entity.attribute-name.id, entity.other.attribute-name.pseudo-class.css,entity.other.attribute-name.pseudo-element.css | #FFC66D | — |
| keyword.scss,keyword.css | #CC8242 | — |
| triple-slash.tag | #CCCCCC | italic |
| token.info-token | #6796E6 | — |
| token.warn-token | #CD9731 | — |
| token.error-token | #F44747 | — |
| token.debug-token | #B267E6 | — |
| keyword.operator.logical.python | #CC8242 | — |
| support.class.dart | #CC8242 | — |
| variable.language.php, variable.other.php | #9E7BB0 | — |
| variable.other.readwrite.perl | #9E7BB0 | — |
| variable.other.property.php | #CC8242 | — |
| support.variable.property.php | #FFC66D | — |
| meta.arrow punctuation.definition.parameters | #CC8242 | italic bold |
| variable.other.readwrite.instance.ruby | #9E7BB0 | bold |
| comment, variable.language, variable.parameter, entity.other.attribute-name, keyword, markup.underline.link, storage.modifier, storage.type, string.url, variable.language.super, variable.language.this | — | |
| keyword.operator, keyword.other.type, storage.modifier.import, storage.modifier.package, storage.type.built-in, storage.type.function.arrow, storage.type.generic, storage.type.java, storage.type.primitive | — |
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 | #000080 | — |
| comment | #808080 | italic |
| constant.language, constant.character | #CC7832 | — |
| constant.numeric | #6897BB | — |
| constant.regexp | #646695 | — |
| entity.name.tag | #FFC66D | — |
| entity.name.tag.css | #FFC66D | — |
| entity.other.attribute-name.class.html, entity.other.attribute-name.class.jade | #9876AA | — |
| entity.other.attribute-name | #A9B7C6 | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.class.mixin.css, entity.other.attribute-name.id.css, entity.other.attribute-name.parent-selector.css, entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css, source.css.less entity.other.attribute-name.id, entity.other.attribute-name.attribute.scss, entity.other.attribute-name.scss | #FFC66D | — |
| invalid | #F44747 | — |
| markup.underline | — | underline |
| markup.bold | #A9B7C6 | bold |
| markup.heading | #A9B7C6 | — |
| markup.italic | — | italic |
| markup.inserted | #6A8759 | — |
| markup.deleted | #CC7832 | — |
| markup.changed | #A9B7C6 | — |
| beginning.punctuation.definition.quote.markdown | #608B4E | — |
| beginning.punctuation.definition.list.markdown | #6796E6 | — |
| markup.inline.raw | #CC7832 | — |
| meta.selector | #FFC66D | — |
| punctuation.definition.tag | #FFC66D | — |
| meta.preprocessor | #CC7832 | — |
| meta.preprocessor.string | #CC7832 | — |
| meta.preprocessor.numeric | #6A8759 | — |
| meta.structure.dictionary.key.python | #9876AA | — |
| meta.diff.header | #CC7832 | — |
| storage | — | — |
| storage.type | #CC7832 | — |
| storage.modifier | #CC7832 | — |
| string | #6A8759 | italic |
| string.tag | #6A8759 | italic |
| string.value | #6A8759 | italic |
| string.regexp | #6A8759 | — |
| punctuation.definition.template-expression.begin.js, punctuation.definition.template-expression.begin.ts, punctuation.definition.template-expression.end.ts, punctuation.definition.template-expression.end.js | #A9B7C6 | — |
| keyword.operator.relational.js, support.type.vendored.property-name, support.type.property-name, variable.css, variable.scss, variable.other.less, entity.other.inherited-class.php, entity.name.type.class.php, entity.name.type.namespace.php, keyword.operator.key.php, storage.type.php, support.class.builtin.php | #A9B7C6 | — |
| variable.other.property, support.variable.property.dom, entity.other.inherited-class, variable.other.php, variable.language.this.php | #9876AA | — |
| variable.other.object, variable.other.object.property, support.class.dom, meta.function-call, entity.name.type.module | #A9B7C6 | — |
| variable.other.readwrite, variable.parameter, variable.other.readwrite.alias | #A9B7C6 | — |
| keyword | #CC7832 | — |
| keyword.control | #CC7832 | — |
| keyword.operator | #CC7832 | — |
| keyword.operator.new, keyword.operator.expression, keyword.operator.cast, keyword.operator.sizeof, keyword.operator.logical.python, keyword.operator.logical.php | #CC7832 | — |
| punctuation.separator.key-value, keyword.operator.assignment, keyword.operator.comparison, keyword.operator.logical, keyword.operator.accessor, keyword.operator.class.php, support.class.exception.php | #A9B7C6 | — |
| keyword.other.unit | #6A8759 | — |
| punctuation.section.embedded.begin.metatag.php, punctuation.section.embedded.end.metatag.php | #CC7832 | — |
| support.function.git-rebase | #9876AA | — |
| constant.sha.git-rebase | #6A8759 | — |
| storage.modifier.import.java, storage.modifier.package.java | #D4D4D4 | — |
| variable.language | #CC7832 | — |
| entity.name.function, support.function, support.constant.handlebars | #FFC66D | — |
| meta.return-type, support.class, support.type, entity.name.type, entity.name.class, storage.type.cs, storage.type.generic.cs, storage.type.modifier.cs, storage.type.variable.cs, storage.type.annotation.java, storage.type.generic.java, storage.type.java, storage.type.object.array.java, storage.type.primitive.array.java, storage.type.primitive.java, storage.type.token.java, storage.type.groovy, storage.type.annotation.groovy, storage.type.parameters.groovy, storage.type.generic.groovy, storage.type.object.array.groovy, storage.type.primitive.array.groovy, storage.type.primitive.groovy | #4EC9B0 | — |
| support.class, entity.name.class, support.type, entity.name.type | #FFC66D | — |
| storage.type.function.arrow | #A9B7C6 | — |
| meta.type.cast.expr, meta.type.new.expr, support.constant.math, support.constant.dom, support.constant.json | #4EC9B0 | — |
| keyword.control | #CC7832 | — |
| meta.definition.variable.name, support.variable | #A9B7C6 | — |
| variable | #FFC66D | — |
| meta.object-literal.key, meta.object-literal.key entity.name.function | #9876AA | — |
| meta.property.object.js, constant.other.object.key.js, string.unquoted.label.js | #9876AA | — |
| 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 | #CC7832 | — |
| token.info-token | #6796E6 | — |
| token.warn-token | #CD9731 | — |
| token.error-token | #F44747 | — |
| token.debug-token | #B267E6 | — |
| modifier, this, comment, storage.modifier.js, entity.other.attribute-name.js | — | italic |
| comment, variable.language, variable.parameter, entity.other.attribute-name, keyword, markup.underline.link, storage.modifier, storage.type, string.url, variable.language.super, variable.language.this | — | |
| keyword.operator, keyword.other.type, storage.modifier.import, storage.modifier.package, storage.type.built-in, storage.type.function.arrow, storage.type.generic, storage.type.java, storage.type.primitive | — |
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 |
|---|---|---|
| raw | #54d4ff | — |
| settings | #ffffff | — |
| variable.parameter.function | #f2f3f5 | — |
| variable | #82cbff | — |
| variable.other | #82cbff | |
| global | #ffffff | — |
| none | #D2945D | — |
| comment | #3d436951 | — |
| comment.line.double-slash | #3d436951 | — |
| comment, comment storage.type, comment variable, comment support.variable, comment support.class, comment support.type, comment entity.name.type, comment entity.name.class, comment keyword.operator, comment: comment, comment.line.double-slash, comment entity.name.class, comment entity.name.type, comment keyword.operator, comment storage.type, comment support.class, comment support.type, comment support.variable, comment variable, Double-Slashed Comment | #1782fc52 | italic |
| storage | #f90086 | — |
| storage.type | #FFF900 | — |
| quote | #777777 | italic |
| punctuation.section.array.begin.php | #abb2bf | — |
| punctuation.section.array.end.php | #abb2bf | — |
| block.scope.end,block.scope.begin | #abb2bf | — |
| punctuation.definition.string.begin, punctuation.definition.string.end | #6dee98f4 | — |
| string | #08fbcf | — |
| string.template meta.template.expression | #d3423e | — |
| constant.numeric | #Ffffff | — |
| none | #F78C6C | — |
| none | #F78C6C | — |
| constant.numeric, constant.character.numeric | #ff9748 | — |
| keyword.other.unit | #f7c66c | — |
| string.regexp, string.regexp keyword.other | #54d4ff | — |
| string.regexp | #57B6C2 | — |
| meta.selector | #CB6CFE | — |
| punctuation.section.embedded, variable.interpolation | #BE4F44 | — |
| keyword | #ff06b4 | — |
| keyword.operator.new | #f90086 | — |
| keyword.other.unit | #fff900 | — |
| keyword.operator.expression.void | #f8ec42 | — |
| meta.property-list.css meta.property-value.css variable.other.less, meta.property-list.scss variable.scss, meta.property-list.sass variable.sass, keyword.operator.logical, keyword.operator.arithmetic, keyword.operator.bitwise, keyword.operator.increment, keyword.operator.ternary, keyword.operator.comparison, keyword.operator.assignment, keyword.operator.operator, keyword.operator.or.regexp, punctuation.definintion.string, punctuation | — | |
| keyword.operator | #29c6ff | — |
| keyword.control.operator | #29c6ff | — |
| keyword.operator.arithmetic, keyword.operator.comparison, keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.expression.is | #29c6ff | — |
| keyword.operator.logical, keyword.operator.logical | #29c6ff | — |
| keyword.operator.bitwise, keyword.operator.bitwise | #29c6ff | — |
| control.elements, keyword.operator.less | #F78C6C | — |
| object.comma | #e23963b6 | — |
| none | #A6B2C0 | — |
| keyword.operator | #abb2bf | — |
| keyword.operator.assignment, keyword.operator.relational, keyword.operator, keyword.operator.bitwise, keyword.operator.comparison, keyword.operator.regexp | #f149ab | — |
| punctuation.definition.tag.html.embed.js | #ff9748 | — |
| punctuation.definition.tag, meta.tag | #29c6ff | — |
| entity.name.tag.custom | #FFF900 | — |
| entity.other.attribute-name | #FFF900 | — |
| entity.other.attribute-name.id | #FAD430 | — |
| entity.other.attribute-name.id | #61afef | — |
| entity.name.type | #f8ec42 | — |
| meta.attribute-selector.scss entity.other.attribute-name.attribute, meta.attribute-selector.sass entity.other.attribute-name.attribute | #ff9c31 | — |
| object | #cccccc | — |
| entity.other.inherited-class | #06fbcf | italic |
| entity.other.inherited-class, entity.name.class, support.class | #7a6deef4 | — |
| support.class, entity.name.type.class | #f8ec42 | — |
| entity.name.type.namespace | #f8ec42 | — |
| support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php | #f8ec42 | — |
| entity.name.class, meta.class entity.name.type.class | #FFF900 | — |
| entity.name.class.identifier.namespace.type | #f8ec42 | — |
| entity.name.class | #61afef | — |
| support.type, support.class | #FFF900 | — |
| support.function, support.constant | #54d4ff | — |
| keyword.other.special-method | #61afef | — |
| entity.name.function | #54d4ff | — |
| entity.name.function | #54d4ff | — |
| meta.function punctuation.separator.comma | #e23963b6 | — |
| function.brace | #abb2bf | — |
| function.parameter | #F78C6C | — |
| punctuation.definition.parameters | #08fbcf | — |
| variable.parameter.function | #29c6ff | — |
| variable.parameter | #ffffff | — |
| meta.function-call | #ffffff | — |
| meta.brace | #ffffff | — |
| meta.delimiter.period | #f90086 | — |
| meta.selector | #f90086 | — |
| meta.property-name | #54d4ff | — |
| meta.tag | #abb2bf | — |
| meta.cast | #e06806 | — |
| punctuation.separator, meta.block, meta.class | #feeee3 | — |
| punctuation.definition.string | #08fbcf | — |
| punctuation.section.embedded | #d3423e | — |
| punctuation.terminator.expression, punctuation.definition.arguments, punctuation.definition.array, punctuation.section.array, meta.array | #ffffff | — |
| punctuation.definition.list.begin, punctuation.definition.list.end, punctuation.separator.arguments, punctuation.definition.list | #08fbcf | — |
| punctuation.terminator | #fafaf9 | — |
| punctuation.definition.string.begin,punctuation.definition.string.end | #98c378 | — |
| constant.language.boolean | #f90086 | — |
| constant.character, constant.other | #54d4ff | — |
| support.constant.math | #FFF900 | — |
| constant.character.escape | #ff9c31 | — |
| constant.other.color.rgb-value punctuation.definition.constant | #ff9c31 | — |
| support.constant, keyword.other.special-method, keyword.other.new | #29c6ff | — |
| constant.language, punctuation.definition.constant, variable.other.constant | #ffffff | — |
| constant.other.symbol | #56b6c2 | — |
| constant | #F78C6C | — |
| punctuation.definition.constant | #F78C6C | — |
| constant.character.escape | #57B6C2 | — |
| support.constant.meta.property-value | #29c6ff | — |
| support.variable.dom | #FFF900 | — |
| support.type.vendored.property-name, support.constant.vendored.property-value, support.type.property-name, meta.property-list entity.name.tag | #54d4ff | — |
| support.function | #29c6ff | — |
| support.variable.property | #29c6ff | — |
| support.function, entity.name.function | #ffffff | |
| support.type.property-name | #ffffff | — |
| support.constant.property-value | #abb2bf | — |
| support.constant.font-name | #F78C6C | — |
| support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php | #F78C6C | — |
| variable.instance, variable.other.instance, variable.readwrite.instance, variable.other.readwrite.instance | #f90086 | — |
| variable.other.property, variable.other.object.property | #29c6ff | — |
| variable.function | #54d4ff | — |
| variable.interpolation | #ec5f67 | — |
| variable.language | #f90086 | — |
| markup.inserted.diff | #98c379 | — |
| markup.deleted.diff | #FB467B | — |
| invalid.broken | #020e14 | — |
| invalid.unimplemented | #ffffff | — |
| invalid.illegal | #ffffff | — |
| invalid.deprecated | #ffffff | — |
| invalid.unimplemented | #ffffff | — |
| invalid.illegal | #ffffff | — |
| invalid.broken | #ffffff | — |
| keyword.operator.error-control.php | #CB6CFE | — |
| invalid | #ffffff | — |
| invalid.deprecated | #ffffff | — |
| constant.language.null | #f90086 | — |
| string.template punctuation.definition.string | #66ff00 | — |
| markup.list.numbered, markup.list.numbered.markdown | #aadcf8 | — |
| beginning.punctuation.definition.list.markdown | #FB467B | — |
| markup.quote.markdown | #a3a3a3 | italic |
| markup.inline.raw.markdown | #54d4ff | — |
| punctuation.definition.string.markdown, punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, meta.link.inline.markdown punctuation.definition.string | #54d4ff | — |
| punctuation.definition.metadata.markdown | #f90086 | — |
| punctuation.definition.heading.markdown | #FB467B | — |
| markup.heading.setext | #ABB2BF | — |
| punctuation.definition.string.begin.markdown,punctuation.definition.string.end.markdown,punctuation.definition.metadata.markdown | #ABB2BF | — |
| punctuation.definition.metadata.markdown, markup.underline.link.image.markdown | #CB6CFE | — |
| markup.underline.link.markdown, markup.underline.link.image.markdown | #f90086 | — |
| string.other.link.title.markdown, string.other.link.description.markdown | #ffffff | — |
| markup.bold, punctuation.definition.bold, punctuation.definition.bold.markdown, bold, markup.bold.markdown | #F78C6C | bold |
| italic, markup.italic, punctuation.definition.italic, markup.italic.markdown, emphasis md | #f90086 | italic |
| markup.italic.markdown | — | italic |
| markup.heading | #FB467B | bold |
| markup.heading.markdown | #e7bfdf | — |
| entity.name.section.markdown | #FB467B | — |
| markup.heading punctuation.definition.heading, entity.name.section | #61afef | — |
| variable.assignment.coffee | #29c6ff | — |
| variable.parameter.function.coffee | #ffffff | — |
| variable.assignment.coffee | #29c6ff | — |
| entity.name.variable.local.cs | #FB467B | — |
| variable.other.readwrite.cs | #ffffff | — |
| entity.name.type.class.cs, storage.type.cs | #87E1FF | — |
| entity.name.type.namespace.cs | #e4b5b5 | — |
| meta.function.c | #FB467B | — |
| keyword.control.cpp | #f8ec42 | — |
| punctuation.section.block.begin.bracket.curly.cpp,punctuation.section.block.end.bracket.curly.cpp,punctuation.terminator.statement.c,punctuation.section.block.begin.bracket.curly.c,punctuation.section.block.end.bracket.curly.c,punctuation.section.parens.begin.bracket.round.c,punctuation.section.parens.end.bracket.round.c,punctuation.section.parameters.begin.bracket.round.c,punctuation.section.parameters.end.bracket.round.c | #abb2bf | — |
| keyword.operator.assignment.c,keyword.operator.comparison.c,keyword.operator.c,keyword.operator.increment.c | #cb6CFE | — |
| punctuation.separator.delimiter.c | #97a7c8 | — |
| support.type.posix-reserved.c | #57adb8 | — |
| keyword.operator.sizeof.c | #CB6CFE | — |
| entity.name.tag.wildcard.css, entity.name.tag.wildcard.less, entity.name.tag.wildcard.scss, entity.name.tag.wildcard.sass | #f90086 | — |
| meta.property-list entity.name.tag.reference | #f90086 | — |
| source.elixir support.type.elixir, source.elixir meta.module.elixir entity.name.class.elixir | #54d4ff | — |
| source.elixir entity.name.function | #FFF900 | — |
| source.elixir constant.other.symbol.elixir, source.elixir constant.other.keywords.elixir | #54d4ff | — |
| source.elixir punctuation.definition.string | #54d4ff | — |
| source.elixir variable.other.readwrite.module.elixir, source.elixir variable.other.readwrite.module.elixir punctuation.definition.variable.elixir | #FFF900 | — |
| source.elixir .punctuation.binary.elixir | #f90086 | — |
| source.go meta.function-call.go | #ffffff | — |
| meta.tag.sgml.doctype.html | #f90086 | — |
| entity.name.tag.doctype, meta.tag.sgml.doctype | #f90086 | — |
| entity.name.type.instance.jsdoc, entity.name.type.instance.phpdoc | #ffffff | — |
| variable.other.jsdoc, variable.other.phpdoc | #78ccf0 | — |
| keyword.operator.heredoc.php,keyword.operator.nowdoc.php | #CB6CFE | — |
| variable.other.ruby | #ffffff | — |
| constant.language.symbol.hashkey.ruby | #020405 | — |
| function.parameter.ruby, function.parameter.cs | #abb2bf | — |
| meta.attribute-selector.less entity.other.attribute-name.attribute | #ff9c31 | — |
| entity.name.tag.less | #f90086 | — |
| keyword.other.unit.css | #fff900 | — |
| constant.language.python | #f90086 | — |
| entity.name.function.decorator.python | #FFF900 | — |
| variable.parameter.function.python, meta.function-call.arguments.python | #B60DFC | — |
| meta.function-call.python, meta.function-call.generic.python | #cccccc | — |
| source.python variable.language.special | #54d4ff | — |
| variable.parameter.function.language.python | #F78C6C | — |
| support.type.python | #56b6c2 | — |
| keyword.operator.logical.python | #CB6CFE | — |
| punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python,meta.function-call.arguments.python | #abb2bf | — |
| meta.function-call.generic.python | #61afef | — |
| meta.function.decorator.python | #61afef | — |
| support.token.decorator.python,meta.function.decorator.identifier.python | #56B6C2 | — |
| punctuation.python | #ffffff | — |
| variable.parameter.function.python | #D18C4E | — |
| meta.function-call.arguments.python | #E06C60 | — |
| meta.function-call.python | #E06C60 | — |
| keyword.operator.type.php | #CB6CFE | — |
| invalid.illegal.non-null-typehinted.php | #ff0000 | — |
| storage.type.php | #f8ec42 | — |
| meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php | #61afef | — |
| entity.name.goto-label.php,support.other.php | #61afef | — |
| keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php | #56b6c2 | — |
| keyword.operator.regexp.php | #CB6CFE | — |
| keyword.operator.comparison.php | #56b6c2 | — |
| punctuation.definition.variable.php | #FB467B | — |
| variable.other.php | #ffffff | — |
| support.class.php | #ff9c31 | — |
| variable.other.global.php | #FFF900 | — |
| variable.other.global.php punctuation.definition.variable | #FFF900 | — |
| meta.function-call.php punctuation | #ffffff | — |
| constant.numeric.css, constant.character.numeric.css | #F78C6C | — |
| keyword.other.unit.css | #fff900 | — |
| punctuation.separator.list.comma.css | #e23963b6 | — |
| punctuation.separator.key-value.css | #fa6bff | — |
| meta.attribute-selector.css entity.other.attribute-name.attribute | #ff9c31 | — |
| constant.other.color | #F78C6C | — |
| support.type.property-name.css | #ffffff | — |
| entity.other.attribute-name | #fff900 | — |
| support.constant.property-value.scss,support.constant.property-value.css | #6cb0fd | — |
| variable.scss, variable.sass, variable.parameter.url.scss, variable.parameter.url.sass | #ffffff | — |
| source.css.scss meta.at-rule variable, source.css.sass meta.at-rule variable | #54d4ff | — |
| source.css.scss meta.at-rule variable, source.css.sass meta.at-rule variable | #ffffff | — |
| keyword.other.unit.scss, keyword.other.unit.sass | #fff900 | — |
| entity.name.tag.scss, entity.name.tag.sass | #f90086 | — |
| selector.sass | #FB467B | — |
| entity.name.tag.yaml | #29c6ff | — |
| support.type.primitive.ts,support.type.builtin.ts | #f8ec42 | — |
| 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 | #ffffff | — |
| entity.name.type.ts, entity.name.type.tsx | #78ccf0 | — |
| variable.other.readwrite.alias.ts, variable.other.readwrite.alias.tsx | #ffffff | — |
| support.class.node.ts, support.class.node.tsx | #54d4ff | — |
| meta.type.parameters.ts entity.name.type, meta.type.parameters.tsx entity.name.type | #ffffff | — |
| meta.import.ts punctuation.definition.block, meta.import.tsx punctuation.definition.block, meta.export.ts punctuation.definition.block, meta.export.tsx punctuation.definition.block | #ffffff | — |
| meta.decorator punctuation.decorator.ts, meta.decorator punctuation.decorator.tsx | #54d4ff | — |
| meta.jsx.children.tsx, meta.tag.js meta.jsx.children.tsx | #54d4ff | — |
| storage.type.js | #ff0088 | — |
| storage.modifier.js | #ff0088 | — |
| storage.modifier.import.js, import.storage.js, meta.import.js, source.js | #FB467B | — |
| meta.definition.variable.name.js | #FB467B | — |
| token.variable.parameter.js | #abb2bf | — |
| variable.other.object.js | #afc3e7 | |
| punctuation.accessor.js | #FB467B | — |
| keyword.operator.new.js | #ff0088 | — |
| meta.method.js, keyword.other.special-method.js, meta.function-call.generic.js, meta.function-call.js, function.parameter.js, token.variable.parameter.js, variable.parameter.js, variable.parameter.function.js | #ffffff | — |
| meta.return-type.java | #ff0088 | — |
| keyword.operator.logical.js,keyword.operator.logical.ts | #FB467B | — |
| keyword.operator.bitwise.js,keyword.operator.bitwise.ts | #FB467B | — |
| punctuation.separator.key-value.js,punctuation.separator.key-value.ts | #97a7c8 | — |
| entity.other.attribute-name.js,variable.parameter.js,variable.language.super.js,entity.other.attribute-name.ts,variable.parameter.ts,variable.language.super.ts, | — | italic |
| entity.name.function.js,support.function.console.js,entity.name.function.ts,support.function.console.ts | #658efd | — |
| support.type.object.console.js,support.type.object.console.ts | #FB467B | — |
| keyword.operator.js,keyword.operator.ts | #56b6c2 | — |
| keyword.operator.expression.instanceof.js,keyword.operator.expression.instanceof.ts,keyword.operator.new.js,keyword.operator.new.ts,keyword.operator.ternary.js,keyword.operator.ternary.ts | #CB6CFE | — |
| support.module.node.js,support.type.object.module.js,support.module.node.js,support.module.node.ts,support.type.object.module.ts,support.module.node.ts | #f8ec42 | — |
| support.type.object.dom.js,support.type.object.dom.ts | #56b6c2 | — |
| support.variable.dom.js,support.variable.property.dom.js,support.variable.dom.ts,support.variable.property.dom.ts, | #FB467B | — |
| var.this.js,var.this.ts,variable.language.this.js,variable.language.this.ts | #f8ec42 | italic |
| keyword.operator.expression.typeof.js,keyword.operator.expression.typeof.ts | #61afef | — |
| token.storage.js, token.storage.ts | #CB6CFE | — |
| punctuation.definition.template-expression.begin.js,punctuation.definition.template-expression.end.js,punctuation.definition.template-expression.begin.ts,punctuation.definition.template-expression.end.ts | #FB467B | — |
| storage.type.ts | #ff0088 | — |
| storage.modifier.ts | #ff0088 | — |
| storage.modifier.import.ts, import.storage.ts, meta.import.ts, source.ts | #FB467B | — |
| meta.definition.variable.name.ts | #FB467B | — |
| token.variable.parameter.ts | #abb2bf | — |
| variable.other.object.ts | #afc3e7 | italic bold |
| punctuation.accessor.ts | #FB467B | — |
| keyword.operator.new.ts | #ff0088 | — |
| meta.method.ts, keyword.other.special-method.ts, meta.function-call.generic.ts, meta.function-call.ts, function.parameter.ts, token.variable.parameter.ts, variable.parameter.ts, variable.parameter.function.ts | #ffffff | — |
| meta.return-type.java | #ff0088 | — |
| support.type.property-name.json | #52b1fff3 | — |
| support.constant.json | #52b1fff3 | — |
| meta.structure.dictionary.value.json string.quoted.double | #30ffe3 | — |
| string.quoted.double.json punctuation.definition.string.json | #66ff00 | — |
| meta.structure.dictionary.json meta.structure.dictionary.value constant.language | #f90086 | — |
| less rgb-value | #F78C6C | — |
| rgb-value | #56B6C2 | — |
| inline-color-decoration rgb-value | #F78C6C | — |
| variable.other.property.java, variable.other.object.property.java | #29c6ff | — |
| comment, comment storage.type, comment variable, comment support.variable, comment support.class, comment support.type, comment entity.name.type, comment entity.name.class, comment keyword.operator, comment: comment, comment.line.double-slash, comment entity.name.class, comment entity.name.type, comment keyword.operator, comment storage.type, comment support.class, comment support.type, comment support.variable, comment variable, Double-Slashed Comment | #2d4e5c | bold |
| token.storage.type.java, storage.type.java, storage.type.annotation.java, storage.type.java, meta.var.expr storage.type.java, meta.class meta.method.declaration.java, meta.var.expr.java, storage.type.java | #f3e84e | — |
| storage.type.annotation.java | #0fc9fc | — |
| storage.modifier.java | #ff0088 | — |
| storage.modifier.import.java, import.storage.java, meta.import.java, source.java | #FB467B | — |
| meta.definition.variable.name.java | #FB467B | — |
| token.variable.parameter.java | #abb2bf | — |
| variable.other.object.java | #e0e4eb | |
| keyword.operator.new.java | #ff0088 | — |
| punctuation.accessor.java | #FB467B | — |
| punctuation.separator.key-value.java | #fa6bff | — |
| entity.name.function.java, support.function.console.java | #658efd | — |
| meta.method.java, keyword.other.special-method.java, meta.function-call.generic.java, meta.function-call.java, function.parameter.java, token.variable.parameter.java, variable.parameter.java, variable.parameter.function.java | #ffffff | — |
| meta.return-type.java | #ff0088 | — |
| keyword.operator.logical.java | #29c6ff | — |
| keyword.operator.bitwise.java | #29c6ff | — |
| token.package.keyword | #CB6CFE | — |
| token.package | #abb2bf | — |
| entity.name.tag, meta.tag | #ff3086 | — |
| string.quoted | #30ffe3 | — |
| entity.other.attribute-name.id.html | #FFF900 | — |
| punctuation.definition.tag.html | #29c6ff | — |
| punctuation.accessor.html | #FB467B | — |
| Token Info Token | #6796e6 | — |
| Token Warn Token | #cd9731 | — |
| Token Error Token | #f44747 | — |
| Token Debug Token | #b267e6 | — |
| token.storage.type.swift, storage.type.swift, storage.type.annotation.swift, storage.type.annotation.swift, storage.type.swift, meta.var.expr storage.type.swift, meta.class meta.method.declaration.swift, meta.var.expr.swift, storage.type.swift | #f3e84e | — |
| storage.modifier.swift | #ff0088 | — |
| storage.modifier.import.swift, import.storage.swift, meta.import.swift, source.swift | #afc3e7 | — |
| meta.definition.variable.name.swift | #FB467B | — |
| token.variable.parameter.swift | #abb2bf | — |
| variable.other.object.swift | #afc3e7 | italic bold |
| keyword.operator.new.swift | #ff0088 | — |
| punctuation.accessor.swift | #FB467B | — |
| punctuation.separator.key-value.swift | #fa6bff | — |
| entity.name.function.swift, support.function.console.swift | #658efd | — |
| meta.class.swift, variable.other.object.swift, meta.method.swift, keyword.other.special-method.swift, function.parameter.swift, token.variable.parameter.swift, variable.parameter.swift, variable.parameter.function.swift | #00abe4 | — |
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, comment storage.type, comment variable, comment support.variable, comment support.class, comment support.type, comment entity.name.type, comment entity.name.class, comment keyword.operator, comment: comment, comment.line.double-slash, comment entity.name.class, comment entity.name.type, comment keyword.operator, comment support.class, comment support.type, comment support.variable, comment variable, Double-Slashed Comment | #888888 | — |
| string | #08FBCF | — |
| string.quoted | #08FBCF | — |
| support.constant.math | #FFF900 | — |
| constant.numeric, constant.character.numeric | #FF9C31 | — |
| constant.language, punctuation.definition.constant, variable.other.constant | #54D4FF | — |
| constant.character, constant.other | #54D4FF | — |
| constant.character.escape | #FF9C31 | — |
| string.regexp, string.regexp keyword.other | #54D4FF | — |
| meta.function punctuation.separator.comma | #FFFFFF | — |
| variable | #FFF900 | — |
| punctuation.accessor, keyword | #F90086 | — |
| storage | #F90086 | — |
| storage.type, meta.var.expr storage.type, meta.class meta.method.declaration meta.var.expr storage.type.js | #F90086 | — |
| entity.name.class, meta.class entity.name.type.class | #FFF900 | — |
| entity.other.inherited-class | #06FBCF | italic |
| entity.name.function | #54D4FF | — |
| variable.parameter | #B60DFC | — |
| punctuation.definition.tag, meta.tag | #54D1FF | — |
| entity.name.tag support.class.component, 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 | #F90086 | — |
| entity.other.attribute-name | #FFF900 | — |
| entity.name.tag.custom | #FFF900 | — |
| support.function, support.constant | #54D4FF | — |
| support.constant.meta.property-value | #54D1FF | — |
| support.type, support.class | #FFF900 | — |
| support.variable.dom | #FFF900 | — |
| invalid | #FFFFFF | — |
| invalid.deprecated | #FFFFFF | — |
| keyword.operator | #54D1FF | — |
| keyword.operator.relational | #F90086 | — |
| keyword.operator.assignment | #F90086 | — |
| comment.line.double-slash | #777777 | — |
| object | #CCCCCC | — |
| constant.language.null | #F90086 | — |
| meta.brace | #FFFFFF | — |
| meta.delimiter.period | #F90086 | — |
| punctuation.definition.string | #08FBCF | — |
| constant.language.boolean | #F90086 | — |
| object.comma | #FFFFFF | — |
| variable.parameter.function | #54D1FF | — |
| support.type.vendored.property-name, support.constant.vendored.property-value, support.type.property-name, meta.property-list entity.name.tag | #54D4FF | — |
| meta.property-list entity.name.tag.reference | #F90086 | — |
| constant.other.color.rgb-value punctuation.definition.constant | #FF9C31 | — |
| constant.other.color | #FFF900 | — |
| keyword.other.unit | #FFF900 | — |
| meta.selector | #F90086 | — |
| entity.other.attribute-name.id | #FAD430 | — |
| meta.property-name | #54D4FF | — |
| entity.name.tag.doctype, meta.tag.sgml.doctype | #F90086 | — |
| punctuation.definition.parameters | #08FBCF | — |
| keyword.control.operator | #54D1FF | — |
| keyword.operator.logical | #F90086 | — |
| variable.instance, variable.other.instance, variable.reaedwrite.instance, variable.other.readwrite.instance | #F90086 | — |
| variable.other.property, variable.other.object.property | #54D1FF | — |
| entity.name.function | #54D4FF | — |
| keyword.operator.comparison | #F90086 | — |
| support.constant, keyword.other.special-method, keyword.other.new | #54D1FF | — |
| support.function | #54D1FF | — |
| invalid.broken | #020E14 | — |
| invalid.unimplemented | #FFFFFF | — |
| invalid.illegal | #FFFFFF | — |
| variable.language | #F90086 | — |
| support.variable.property | #54D1FF | — |
| variable.function | #54D4FF | — |
| variable.interpolation | #EC5F67 | — |
| meta.function-call | #54D4FF | — |
| punctuation.section.embedded | #D3423E | — |
| punctuation.terminator.expression, punctuation.definition.arguments, punctuation.definition.array, punctuation.section.array, meta.array | #FFFFFF | — |
| punctuation.terminator | #F90086 | — |
| punctuation.definition.list.begin, punctuation.definition.list.end, punctuation.separator.arguments, punctuation.definition.list | #08FBCF | — |
| string.template meta.template.expression | #D3423E | — |
| string.template punctuation.definition.string | #FFFFFF | — |
| italic | #F90086 | italic |
| bold | #FFF900 | bold |
| quote | #777777 | italic |
| raw | #54D4FF | — |
| variable.assignment.coffee | #54D1FF | — |
| variable.parameter.function.coffee | #FFFFFF | — |
| variable.assignment.coffee | #54D1FF | — |
| variable.other.readwrite.cs | #FFFFFF | — |
| entity.name.type.class.cs, storage.type.cs | #87E1FF | — |
| entity.name.type.namespace.cs | #CCCCCC | — |
| entity.name.tag.css, entity.name.tag.less, entity.name.tag.custom.css | #F90086 | — |
| entity.name.tag.wildcard.css, entity.name.tag.wildcard.less, entity.name.tag.wildcard.scss, entity.name.tag.wildcard.sass | #F90086 | — |
| keyword.other | #FFF900 | — |
| meta.attribute-selector.css entity.other.attribute-name.attribute | #FF9C31 | — |
| source.elixir support.type.elixir, source.elixir meta.module.elixir entity.name.class.elixir | #54D4FF | — |
| source.elixir entity.name.function | #FFF900 | — |
| source.elixir constant.other.symbol.elixir, source.elixir constant.other.keywords.elixir | #54D4FF | — |
| source.elixir punctuation.definition.string | #54D4FF | — |
| source.elixir variable.other.readwrite.module.elixir, source.elixir variable.other.readwrite.module.elixir punctuation.definition.variable.elixir | #FFF900 | — |
| source.elixir .punctuation.binary.elixir | #F90086 | — |
| source.go meta.function-call.go | #FFFFFF | — |
| entity.other.attribute-name.id.html | #FFF900 | — |
| punctuation.definition.tag.html | #54D1FF | — |
| meta.tag.sgml.doctype.html | #F90086 | — |
| meta.class entity.name.type.class.js | #FF9C31 | — |
| meta.method.declaration storage.type.js | #54D4FF | normal |
| terminator.js | #FFFFFF | — |
| meta.js punctuation.definition.js | #FFFFFF | — |
| entity.name.type.instance.jsdoc, entity.name.type.instance.phpdoc | #FFFFFF | — |
| variable.other.jsdoc, variable.other.phpdoc | #78CCF0 | — |
| variable.other.meta.import.js, meta.import.js variable.other, variable.other.meta.export.js, meta.export.js variable.other | #FFFFFF | — |
| variable.parameter.function.js | #B60DFC | — |
| variable.other.readwrite.js | #FFFFFF | — |
| variable.other.object.js, variable.other.object.jsx, variable.object.property.js, variable.object.property.jsx | #FFFFFF | — |
| variable.js, variable.other.js | #FFFFFF | — |
| entity.name.type.js, entity.name.type.module.js | #FF9C31 | — |
| support.class.js | #FFFFFF | — |
| support.type.property-name.json | #08FBCF | — |
| support.constant.json | #FFF900 | — |
| meta.structure.dictionary.value.json string.quoted.double | #54D4FF | — |
| string.quoted.double.json punctuation.definition.string.json | #54D4FF | — |
| meta.structure.dictionary.json meta.structure.dictionary.value constant.language | #F90086 | — |
| variable.other.ruby | #FFFFFF | — |
| constant.language.symbol.hashkey.ruby | #54D1FF | — |
| entity.name.tag.less | #F90086 | — |
| keyword.other.unit.css | #FFF900 | — |
| meta.attribute-selector.less entity.other.attribute-name.attribute | #FF9C31 | — |
| markup.heading.markdown | #54D4FF | — |
| markup.italic.markdown | #F90086 | italic |
| markup.bold.markdown | #FFF900 | bold |
| markup.quote.markdown | #777777 | italic |
| markup.inline.raw.markdown | #54D4FF | — |
| markup.underline.link.markdown, markup.underline.link.image.markdown | #F90086 | — |
| string.other.link.title.markdown, string.other.link.description.markdown | #FFFFFF | — |
| punctuation.definition.string.markdown, punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, meta.link.inline.markdown punctuation.definition.string | #54D4FF | — |
| punctuation.definition.metadata.markdown | #F90086 | — |
| beginning.punctuation.definition.list.markdown | #54D4FF | — |
| variable.other.php | #FFFFFF | — |
| support.class.php | #FF9C31 | — |
| meta.function-call.php punctuation | #FFFFFF | — |
| variable.other.global.php | #FFF900 | — |
| variable.other.global.php punctuation.definition.variable | #FFF900 | — |
| constant.language.python | #F90086 | — |
| variable.parameter.function.python, meta.function-call.arguments.python | #B60DFC | — |
| meta.function-call.python, meta.function-call.generic.python | #CCCCCC | — |
| punctuation.python | #FFFFFF | — |
| entity.name.function.decorator.python | #FFF900 | — |
| source.python variable.language.special | #54D4FF | — |
| variable.scss, variable.sass, variable.parameter.url.scss, variable.parameter.url.sass | #FFFFFF | — |
| source.css.scss meta.at-rule variable, source.css.sass meta.at-rule variable | #54D4FF | — |
| source.css.scss meta.at-rule variable, source.css.sass meta.at-rule variable | #FFFFFF | — |
| meta.attribute-selector.scss entity.other.attribute-name.attribute, meta.attribute-selector.sass entity.other.attribute-name.attribute | #FF9C31 | — |
| entity.name.tag.scss, entity.name.tag.sass | #F90086 | — |
| keyword.other.unit.scss, keyword.other.unit.sass | #FFF900 | — |
| 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 | #FFFFFF | — |
| entity.name.type.ts, entity.name.type.tsx | #78CCF0 | — |
| support.class.node.ts, support.class.node.tsx | #54D4FF | — |
| meta.type.parameters.ts entity.name.type, meta.type.parameters.tsx entity.name.type | #FFFFFF | — |
| meta.import.ts punctuation.definition.block, meta.import.tsx punctuation.definition.block, meta.export.ts punctuation.definition.block, meta.export.tsx punctuation.definition.block | #FFFFFF | — |
| meta.decorator punctuation.decorator.ts, meta.decorator punctuation.decorator.tsx | #54D4FF | — |
| meta.jsx.children.tsx, meta.tag.js meta.jsx.children.tsx | #54D4FF | — |
| entity.name.tag.yaml | #54D1FF | — |
| meta.property-list.css meta.property-value.css variable.other.less, meta.property-list.scss variable.scss, meta.property-list.sass variable.sass, keyword.operator.logical, keyword.operator.arithmetic, keyword.operator.bitwise, keyword.operator.increment, keyword.operator.ternary, keyword.operator.comparison, keyword.operator.assignment, keyword.operator.operator, keyword.operator.or.regexp, punctuation.definintion.string, punctuation | — | normal |
| comment, variable.language, variable.parameter, entity.other.attribute-name, keyword, markup.underline.link, storage.modifier, storage.type, string.url, variable.language.super, variable.language.this | — | |
| keyword.operator, keyword.other.type, storage.modifier.import, storage.modifier.package, storage.type.built-in, storage.type.function.arrow, storage.type.generic, storage.type.java, storage.type.primitive | — | |
| token.info-token | #6796E6 | — |
| token.warn-token | #CD9731 | — |
| token.error-token | #F44747 | — |
| token.debug-token | #B267E6 | — |
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}!`;
}