Solracss theme
Publisher: solracssThemes in package: 1
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 |
|---|---|---|
| entity.name.function, support.function, support.constant.handlebars, source.powershell variable.other.member, entity.name.operator.custom-literal | #C1CFF1 | — |
| entity.name.function, variable.other.enummember, meta.function-call, meta.function-call entity.name.function, variable.function, meta.definition.method entity.name.function, meta.object-literal entity.name.function | #C1CFF1 | — |
| 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 | #4EC9B0 | — |
| 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 | #4EC9B0 | — |
| keyword.operator, keyword.control.as, punctuation, keyword.other, keyword.operator.bitwise.shift, expression.embbeded.vue punctuation.definition.tag, text.html.twig meta.tag.inline.any.html, meta.tag.template.value.twig meta.function.arguments.twig, meta.directive.vue punctuation.separator.key-value.html, punctuation.definition.constant.markdown, punctuation.support.type.property-name, text.html.vue-html meta.tag, punctuation.definition.keyword, punctuation.terminator.rule, punctuation.definition.entity, punctuation.separator.inheritance.php, keyword.other.template, keyword.other.substitution, entity.name.operator, meta.property-list punctuation.separator.key-value, meta.at-rule.mixin punctuation.separator.key-value, meta.at-rule.function variable.parameter.url | #98C379 | — |
| variable.other punctuation.definition.variable | #c0caf5 | — |
| variable, support.variable, string constant.other.placeholder, variable.parameter.handlebars, variable.other.object | #a5accc | — |
| keyword.other.using.cs, keyword.other.namespace.cs, keyword.other.var.cs, keyword.other.interface.cs, constant.language.null.cs, keyword.other.this.cs | #c878d2 | — |
| entity.name.type.namespace.cs | #c8c8c8 | — |
| entity.name.type.class.cs | #4ec9b0 | — |
| entity.name.variable.field.cs | #9cdcfe | — |
| entity.name.type.interface.cs | #a6e22e | — |
| entity.name.type.cs | #4ec9b0 | — |
| entity.name.function.cs | #c8c8c8 | — |
| punctuation.parenthesis.open.cs, punctuation.parenthesis.close.cs, punctuation.definition.typeparameters.begin.cs, punctuation.definition.typeparameters.end.cs, punctuation.curlybrace.open.cs, punctuation.curlybrace.close.cs | #c8c8c8 | — |
| text.html | #ABB2BF | — |
| comment | #838994 | italic |
| comment markup.link | #838994 | — |
| keyword | #C678DD | — |
| keyword.control | #AA94D1 | — |
| keyword.operator | #C678DD | — |
| keyword.other.special-method | #61AFEF | — |
| storage | #C678DD | — |
| storage.type.annotation, storage.type.primitive, storage.type.function | #C678DD | — |
| storage.modifier.package, storage.modifier.import | #ABB2BF | — |
| constant.character.escape | #56B6C2 | — |
| constant.numeric | #ABB2BF | — |
| constant.language.boolean.false.js, constant.language.boolean.true.js | #C678DD | — |
| constant.other.color, constant.other.color.rgb-value.hex punctuation.definition.constant | #9aa5ce | — |
| constant.other.symbol | #56B6C2 | — |
| variable.other.property, support.variable.property, variable.other.object.property, support.variable.property.dom, meta.function-call variable.other.object.property, variable.other.object.property.cs | #93cff1 | — |
| variable.interpolation | #BE5046 | — |
| variable.parameter | #ABB2BF | — |
| string | #89b369 | — |
| string > source, string embedded | #ABB2BF | — |
| string.regexp | #56B6C2 | — |
| string.regexp source.ruby.embedded | #E5C07B | — |
| string.other.link | #E06C75 | — |
| punctuation.definition.comment | #5C6370 | — |
| punctuation.definition.method-parameters, punctuation.definition.function-parameters, punctuation.definition.parameters, punctuation.definition.separator, punctuation.definition.seperator, punctuation.definition.array | #ABB2BF | — |
| punctuation.definition.heading, punctuation.definition.identity | #61AFEF | — |
| punctuation.definition.bold | #E5C07B | bold |
| punctuation.definition.italic | #C678DD | — |
| punctuation.section.embedded | #BE5046 | — |
| punctuation.section.method, punctuation.section.class, punctuation.section.inner-class | #ABB2BF | — |
| support.class | #4EC9B0 | — |
| support.type | #56B6C2 | — |
| support.function | #56B6C2 | — |
| support.function.any-method | #61AFEF | — |
| keyword.operator.logical, keyword.operator.bitwise, keyword.operator.ternary, keyword.operator.comparison, keyword.operator.relational, keyword.operator.or.regexp | #67cdcc | — |
| variable.other.object.js | — | — |
| keyword, storage.type, storage.modifier, variable.language.this | — | — |
| keyword.operator | — | — |
| storage, meta.var.expr, meta.class meta.method.declaration meta.var.expr storage.type.js, storage.type.property.js, storage.type.property.ts | — | — |
| entity.other.attribute-name | — | — |
| punctuation.decorator | — | — |
| invalid | — | italic bold underline |
| invalid.deprecated | — | bold italic underline |
| markup.quote | — | italic |
| meta.class-method.js, entity.name.function.js, entity.name.method.js, variable.function.constructor, keyword.other.special-method, storage.type.cs | #5db0d7 | — |
| entity.name.section | #61AFEF | — |
| entity.name.tag | #E06C75 | — |
| entity.name.tag.css | #2bdbd2 | — |
| entity.other.attribute-name.class, meta.at-rule.mixin.scss entity.name.function.scss | #9ece6a | — |
| entity.other.attribute-name.pseudo-class punctuation.definition.entity, entity.other.attribute-name.pseudo-element punctuation.definition.entity, entity.other.attribute-name.class punctuation.definition.entity, entity.name.tag.reference | #e0af68 | — |
| keyword.control.at-rule.include punctuation.definition.keyword, keyword.control.at-rule.mixin punctuation.definition.keyword, meta.at-rule.include keyword.control.at-rule.include, keyword.control.at-rule.extend punctuation.definition.keyword, meta.at-rule.extend keyword.control.at-rule.extend, entity.other.attribute-name.placeholder.css punctuation.definition.entity.css, meta.at-rule.media keyword.control.at-rule.media, meta.at-rule.mixin keyword.control.at-rule.mixin, meta.at-rule.function keyword.control.at-rule.function, keyword.control punctuation.definition.keyword | #AA94D1 | — |
| entity.other.attribute-name.id | #61AFEF | — |
| entity.other.attribute-name.id | #FC7B7B | — |
| meta.class | #4EC9B0 | — |
| meta.class.body | #ABB2BF | — |
| meta.method-call, meta.method | #ABB2BF | — |
| meta.definition.variable | #E06C75 | — |
| meta.link | #D19A66 | — |
| meta.require | #61AFEF | — |
| meta.selector | #C678DD | — |
| meta.separator | #ABB2BF | — |
| punctuation.definition.tag | #ba3c97 | — |
| none | #ABB2BF | — |
| invalid.deprecated | #AA94D1 | — |
| markup.bold | #D19A66 | bold |
| markup.changed | #C678DD | — |
| markup.deleted | #E06C75 | — |
| markup.italic | #C678DD | — |
| markup.heading | #E06C75 | — |
| markup.heading punctuation.definition.heading | #61AFEF | — |
| markup.link | #56B6C2 | — |
| markup.inserted | #98C379 | — |
| markup.quote | #D19A66 | — |
| markup.raw | #98C379 | — |
| source.c keyword.operator | #C678DD | — |
| source.cpp keyword.operator | #C678DD | — |
| source.cs keyword.operator | #C678DD | — |
| source.css property-name, source.css property-value | #828997 | — |
| source.css property-name.support, source.css property-value.support | #ABB2BF | — |
| source.elixir source.embedded.source | #ABB2BF | — |
| source.elixir constant.language, source.elixir constant.numeric, source.elixir constant.definition | #61AFEF | — |
| source.elixir variable.definition, source.elixir variable.anonymous | #C678DD | — |
| source.elixir parameter.variable.function | #D19A66 | — |
| source.elixir quoted | #98C379 | — |
| source.elixir keyword.special-method, source.elixir embedded.section, source.elixir embedded.source.empty | #E06C75 | — |
| source.elixir readwrite.module punctuation | #E06C75 | — |
| source.elixir regexp.section, source.elixir regexp.string | #BE5046 | — |
| source.elixir separator, source.elixir keyword.operator | #D19A66 | — |
| source.elixir variable.constant | #E5C07B | — |
| source.elixir array, source.elixir scope, source.elixir section | #828997 | — |
| source.gfm link entity | #61AFEF | — |
| source.go storage.type.string | #c878d2 | — |
| source.ini keyword.other.definition.ini | #E06C75 | — |
| source.java storage.modifier.import | #E5C07B | — |
| source.java storage.type | #E5C07B | — |
| source.java keyword.operator.instanceof | #C678DD | — |
| source.java-properties meta.key-pair | #E06C75 | — |
| source.java-properties meta.key-pair > punctuation | #ABB2BF | — |
| source.js keyword.operator | #52bcca | — |
| source.js keyword.operator.delete, source.js keyword.operator.in, source.js keyword.operator.of, source.js keyword.operator.instanceof, source.js keyword.operator.new, source.js keyword.operator.typeof, source.js keyword.operator.void | #C678DD | — |
| source.ts keyword.operator | #52bcca | — |
| source.flow keyword.operator | #56B6C2 | — |
| source.json meta.structure.dictionary.json > string.quoted.json | #E06C75 | — |
| source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string | #E06C75 | — |
| source.json meta.structure.dictionary.json > value.json > string.quoted.json, source.json meta.structure.array.json > value.json > string.quoted.json, source.json meta.structure.dictionary.json > value.json > string.quoted.json > punctuation, source.json meta.structure.array.json > value.json > string.quoted.json > punctuation | #98C379 | — |
| source.json meta.structure.dictionary.json > constant.language.json, source.json meta.structure.array.json > constant.language.json | #56B6C2 | — |
| ng.interpolation | #E06C75 | — |
| ng.interpolation.begin, ng.interpolation.end | #61AFEF | — |
| ng.interpolation function | #E06C75 | — |
| ng.interpolation function.begin, ng.interpolation function.end | #61AFEF | — |
| ng.interpolation bool | #D19A66 | — |
| ng.interpolation bracket | #ABB2BF | — |
| ng.pipe, ng.operator | #ABB2BF | — |
| ng.tag | #56B6C2 | — |
| ng.attribute-with-value attribute-name | #E5C07B | — |
| ng.attribute-with-value string | #C678DD | — |
| ng.attribute-with-value string.begin, ng.attribute-with-value string.end | #ABB2BF | — |
| source.php class.bracket | #ABB2BF | — |
| source.python keyword.operator.logical.python | #C678DD | — |
| source.python variable.parameter | #D19A66 | — |
| customrule | #ABB2BF | — |
| support.type.property-name | #ABB2BF | — |
| string.quoted.double punctuation | #98C379 | — |
| support.constant | #D19A66 | — |
| support.constant.font-name, meta.definition.variable | #98C379 | — |
| 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, support.type.property-name.css, support.type.vendored.property-name, support.type.map.key | #ABB2BF | — |
| entity.other.attribute-name, text.html.basic entity.other.attribute-name.html, text.html.basic entity.other.attribute-name | #aa94d1 | — |
| entity.other.attribute-name.pseudo-class, entity.other.attribute-name.pseudo-element, entity.other.attribute-name.placeholder, meta.property-list meta.property-value | #bb9af7 | — |
| keyword.other.unit | #f7768e | — |
| support.type.property-name.json | #E06C75 | — |
| support.type.property-name.json punctuation | #E06C75 | — |
| punctuation.separator.key-value.ts, punctuation.separator.key-value.js, punctuation.separator.key-value.tsx | #56B6C2 | — |
| source.js.embedded.html keyword.operator, source.ts.embedded.html keyword.operator | #56B6C2 | — |
| variable.other.readwrite.js, variable.other.readwrite.ts, variable.other.readwrite.tsx | #ABB2BF | |
| support.variable.dom.js, support.variable.dom.ts | #E06C75 | — |
| support.variable.property.dom.js, support.variable.property.dom.ts | #E06C75 | — |
| meta.template.expression.js punctuation.definition, meta.template.expression.ts punctuation.definition | #98C379 | — |
| source.ts punctuation.definition.typeparameters, source.js punctuation.definition.typeparameters, source.tsx punctuation.definition.typeparameters | #ABB2BF | — |
| source.ts punctuation.definition.block, source.js punctuation.definition.block, source.tsx punctuation.definition.block | #ABB2BF | — |
| source.ts punctuation.separator.comma, source.js punctuation.separator.comma, source.tsx punctuation.separator.comma | #ABB2BF | — |
| support.variable.property.js, support.variable.property.ts, support.variable.property.tsx | #ABB2BF | — |
| keyword.control.default.js, keyword.control.default.ts, keyword.control.default.tsx | #AA94D1 | — |
| keyword.control.import, keyword.control.export, keyword.control.from, keyword.control.default, meta.import keyword.other | #AA94D1 | — |
| keyword.operator.expression.instanceof.js, keyword.operator.expression.instanceof.ts, keyword.operator.expression.instanceof.tsx | #C678DD | — |
| keyword.operator.expression.of.js, keyword.operator.expression.of.ts, keyword.operator.expression.of.tsx | #C678DD | — |
| meta.brace.round.js, meta.array-binding-pattern-variable.js, meta.brace.square.js, meta.brace.round.ts, meta.array-binding-pattern-variable.ts, meta.brace.square.ts, meta.brace.round.tsx, meta.array-binding-pattern-variable.tsx, meta.brace.square.tsx | #ABB2BF | — |
| source.js punctuation.accessor, source.ts punctuation.accessor, source.tsx punctuation.accessor | #ABB2BF | — |
| punctuation.terminator.statement.js, punctuation.terminator.statement.ts, punctuation.terminator.statement.tsx | #ABB2BF | — |
| meta.array-binding-pattern-variable.js variable.other.readwrite.js, meta.array-binding-pattern-variable.ts variable.other.readwrite.ts, meta.array-binding-pattern-variable.tsx variable.other.readwrite.tsx | #D19A66 | — |
| source.js support.variable, source.ts support.variable, source.tsx support.variable | #E06C75 | — |
| keyword.operator.new.ts, keyword.operator.new.j, keyword.operator.new.tsx | #C678DD | — |
| source.ts keyword.operator, source.tsx keyword.operator | #56B6C2 | — |
| punctuation.separator.parameter.js, punctuation.separator.parameter.ts, punctuation.separator.parameter.tsx | #ABB2BF | — |
| constant.language.import-export-all.js, constant.language.import-export-all.ts | #E06C75 | — |
| constant.language.import-export-all.jsx, constant.language.import-export-all.tsx | #56B6C2 | — |
| keyword.control.as.js, keyword.control.as.ts, keyword.control.as.jsx, keyword.control.as.tsx | #ABB2BF | — |
| variable.other.readwrite.alias.js, variable.other.readwrite.alias.ts, variable.other.readwrite.alias.jsx, variable.other.readwrite.alias.tsx | #5DB0D7 | — |
| variable.other.constant.js, variable.other.constant.ts, variable.other.constant.jsx, variable.other.constant.tsx | #ABB2BF | — |
| meta.export.default.js variable.other.readwrite.js, meta.export.default.ts variable.other.readwrite.ts | #C678DD | — |
| source.js meta.template.expression.js punctuation.accessor, source.ts meta.template.expression.ts punctuation.accessor, source.tsx meta.template.expression.tsx punctuation.accessor | #98C379 | — |
| source.js meta.import-equals.external.js keyword.operator, source.jsx meta.import-equals.external.jsx keyword.operator, source.ts meta.import-equals.external.ts keyword.operator, source.tsx meta.import-equals.external.tsx keyword.operator | #ABB2BF | — |
| entity.name.type.module.js,entity.name.type.module.ts,entity.name.type.module.jsx,entity.name.type.module.tsx | #98C379 | — |
| meta.class.js,meta.class.ts,meta.class.jsx,meta.class.tsx | #ABB2BF | — |
| meta.definition.property.js variable, meta.definition.property.ts variable, meta.definition.property.jsx variable, meta.definition.property.tsx variable | #ABB2BF | — |
| meta.type.parameters.js support.type, meta.type.parameters.jsx support.type, meta.type.parameters.ts support.type, meta.type.parameters.tsx support.type | #ABB2BF | — |
| source.js meta.tag.js keyword.operator, source.jsx meta.tag.jsx keyword.operator, source.ts meta.tag.ts keyword.operator, source.tsx meta.tag.tsx keyword.operator | #ABB2BF | — |
| meta.tag.js punctuation.section.embedded, meta.tag.jsx punctuation.section.embedded, meta.tag.ts punctuation.section.embedded, meta.tag.tsx punctuation.section.embedded | #ABB2BF | — |
| meta.array.literal.js variable, meta.array.literal.jsx variable, meta.array.literal.ts variable, meta.array.literal.tsx variable | #E5C07B | — |
| support.type.object.module.js, support.type.object.module.jsx, support.type.object.module.ts, support.type.object.module.tsx | #C678DD | — |
| constant.language.json | #56B6C2 | — |
| storage.type.property.js, storage.type.property.jsx, storage.type.property.ts, storage.type.property.tsx | #56B6C2 | — |
| meta.template.expression.js string.quoted punctuation.definition, meta.template.expression.jsx string.quoted punctuation.definition, meta.template.expression.ts string.quoted punctuation.definition, meta.template.expression.tsx string.quoted punctuation.definition | #98C379 | — |
| meta.template.expression.js string.template punctuation.definition.string.template, meta.template.expression.jsx string.template punctuation.definition.string.template, meta.template.expression.ts string.template punctuation.definition.string.template, meta.template.expression.tsx string.template punctuation.definition.string.template | #98C379 | — |
| keyword.operator.expression.in.js, keyword.operator.expression.in.jsx, keyword.operator.expression.in.ts, keyword.operator.expression.in.tsx | #C678DD | — |
| variable.other.object.js, variable.other.object.ts | #97bcff | — |
| meta.object-literal.key.js, meta.object-literal.key.ts | #ABB2BF | — |
| source.python constant.other | #ABB2BF | — |
| source.python constant | #D19A66 | — |
| constant.character.format.placeholder.other.python storage | #D19A66 | — |
| support.variable.magic.python | #E06C75 | — |
| meta.function.parameters.python | #D19A66 | — |
| punctuation.separator.annotation.python | #ABB2BF | — |
| punctuation.separator.parameters.python | #ABB2BF | — |
| source.cs keyword.operator | #ABB2BF | — |
| variable.other.readwrite.cs | #ABB2BF | — |
| variable.other.object.cs | #ABB2BF | — |
| variable.other.object.property.cs | #ABB2BF | — |
| entity.name.variable.property.cs | #61AFEF | — |
| storage.type.cs | #E5C07B | — |
| keyword.other.unsafe.rust | #C678DD | — |
| entity.name.type.rust | #56B6C2 | — |
| storage.modifier.lifetime.rust | #ABB2BF | — |
| entity.name.lifetime.rust | #D19A66 | — |
| storage.type.core.rust | #56B6C2 | — |
| meta.attribute.rust | #D19A66 | — |
| storage.class.std.rust | #56B6C2 | — |
| markup.raw.block.markdown | #ABB2BF | — |
| punctuation.definition.variable.shell | #E06C75 | — |
| support.constant.property-value.css | #D19A66 | — |
| punctuation.definition.constant.css | #D19A66 | — |
| punctuation.separator.key-value.scss | #ABB2BF | — |
| punctuation.definition.constant.scss | #D19A66 | — |
| meta.property-list.scss punctuation.separator.key-value.scss | #ABB2BF | — |
| storage.type.primitive.array.java | #E5C07B | — |
| entity.name.section.markdown | #E06C75 | — |
| punctuation.definition.heading.markdown | #E06C75 | — |
| markup.heading.setext | #ABB2BF | — |
| punctuation.definition.bold.markdown | #D19A66 | — |
| markup.inline.raw.markdown | #98C379 | — |
| beginning.punctuation.definition.list.markdown | #E06C75 | — |
| markup.quote.markdown | #5C6370 | italic |
| punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown | #ABB2BF | — |
| punctuation.definition.metadata.markdown | #C678DD | — |
| markup.underline.link.markdown, markup.underline.link.image.markdown | #C678DD | — |
| string.other.link.title.markdown, string.other.link.description.markdown | #61AFEF | — |
| punctuation.separator.variable.ruby | #E06C75 | — |
| variable.other.constant.ruby | #D19A66 | — |
| keyword.operator.other.ruby | #98C379 | — |
| punctuation.definition.variable.php | #E06C75 | — |
| meta.class.php | #ABB2BF | — |
| source.json meta.structure.dictionary.json support.type.property-name.json | #7aa2f7 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #2ac3de | — |
| 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 | #7dcfff | — |
| 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 | #bb9af7 | — |
| 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 | #e0af68 | — |
| 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 | #2ac3de | — |
| 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 | #73daca | — |
| 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 | #f7768e | — |
| 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 | #9ece6a | — |
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}!`;
}