Darkwaves
Publisher: spacelaxyThemes in package: 11
Beautiful dark themes collection by Spacelaxy LLC
Beautiful dark themes collection by Spacelaxy LLC
Full workbench mockup using this variant's colors and tokenColors.
Workbench UI color keys from the theme JSON colors map.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| comment.block.html, punctuation.definition.comment.html | #a4b88f | italic |
| entity.name.tag.html, meta.tag.html, entity.name.tag.jsx, meta.tag.jsx, entity.name.tag.tsx, meta.tag.tsx, entity.name.tag.php, meta.tag.php | #b69fd6 | — |
| punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php, meta.tag.php, meta.tag.php.html, meta.tag.php.xml, meta.tag.php.yaml, meta.tag.php.json, meta.tag.php.css, meta.tag.php.scss, meta.tag.php.less, meta.tag.php.stylus, meta.tag.php.sass, meta.tag.php.styl, meta.tag.php.jsx, meta.tag.php.tsx | #8c78e6 | — |
| support.class.component.jsx, support.class.component.tsx, entity.name.tag.custom.jsx, entity.name.tag.custom.tsx | #9cb3e6 | — |
| punctuation.separator.key-value.html, punctuation.separator.key-value.jsx, punctuation.separator.key-value.tsx, punctuation.separator.key-value.php | #a0a0a0 | — |
| punctuation.definition.tag.begin.html, punctuation.definition.tag.begin.jsx, punctuation.definition.tag.begin.tsx, punctuation.definition.tag.begin.php | #8c78e6 | — |
| punctuation.definition.tag.end.html, punctuation.definition.tag.end.jsx, punctuation.definition.tag.end.tsx, punctuation.definition.tag.end.php | #9cb3e6 | — |
| entity.other.attribute-name.html, entity.other.attribute-name.class.html, entity.other.attribute-name.id.html, entity.other.attribute-name.jsx, entity.other.attribute-name.class.jsx, entity.other.attribute-name.id.jsx, entity.other.attribute-name.tsx, entity.other.attribute-name.class.tsx, entity.other.attribute-name.id.tsx, entity.other.attribute-name.php, entity.other.attribute-name.class.php, entity.other.attribute-name.id.php | #9cb3e6 | normal |
| string.quoted.double.html, string.quoted.single.html, string.quoted.double.jsx, string.quoted.single.jsx, string.quoted.double.tsx, string.quoted.single.tsx, string.template.jsx, string.template.tsx, string.quoted.double.php, string.quoted.single.php | #e8bfa6 | — |
| meta.tag.sgml.doctype.html, entity.name.tag.doctype.html, meta.tag.sgml.doctype.php, entity.name.tag.doctype.php | #cccccc | — |
| constant.character.entity.html, constant.other.entity.html, constant.character.entity.jsx, constant.other.entity.jsx, constant.character.entity.tsx, constant.other.entity.tsx, constant.character.entity.php, constant.other.entity.php | #a7e6c4 | — |
| constant.numeric.html, constant.numeric.jsx, constant.numeric.tsx, constant.numeric.php | #89d6e4 | — |
| string.unquoted.html, string.unquoted.jsx, string.unquoted.tsx, meta.jsx.children, meta.tsx.children | #dcdcdc | — |
| comment.block.css, comment.block.scss, comment.block.less, comment.line.double-slash.scss, comment.line.double-slash.less | #a4b88f | italic |
| entity.name.tag.css, entity.name.tag.scss, entity.name.tag.less | #b69fd6 | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.id.css, entity.other.attribute-name.class.scss, entity.other.attribute-name.id.scss, entity.other.attribute-name.class.less, entity.other.attribute-name.id.less | #9cb3e6 | — |
| entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css, entity.other.attribute-name.pseudo-class.scss, entity.other.attribute-name.pseudo-element.scss, entity.other.attribute-name.pseudo-class.less, entity.other.attribute-name.pseudo-element.less | #b69fd6 | — |
| support.type.property-name.css, support.type.property-name.scss, support.type.property-name.less, support.type.property-name.custom-property.css | #9cb3e6 | — |
| support.type.property-name.custom-property.css | #e6a7c1 | — |
| support.constant.property-value.css, support.constant.property-value.scss, support.constant.property-value.less | #a7e6c4 | — |
| support.function.url.css, support.function.misc.css, support.function.transform.css, support.function.var.css, support.function.color.css, support.function.misc.scss, support.function.misc.less | #d4c088 | — |
| constant.other.color.rgb-value.css, constant.other.color.css, constant.other.color.scss, constant.other.color.less, support.constant.color.w3c-standard-color-name.css | #a7e6c4 | — |
| string.quoted.single.css, string.quoted.double.css, string.quoted.single.scss, string.quoted.double.scss, string.quoted.single.less, string.quoted.double.less | #e8bfa6 | — |
| keyword.other.important.css, keyword.other.important.scss, keyword.other.important.less | #b69fd6 | — |
| keyword.control.at-rule.css, keyword.control.at-rule.media.css, keyword.control.at-rule.keyframes.css | #b69fd6 | — |
| punctuation.separator.key-value.css, punctuation.terminator.rule.css, punctuation.section.property-list.begin.css, punctuation.section.property-list.end.css, keyword.operator.combinator.css, keyword.operator.combinator.scss, keyword.operator.combinator.less | #cccccc | — |
| variable.other.custom-property.css, variable.scss, variable.other.less | #e6a7c1 | — |
| comment.line.double-slash.jsonc, comment.block.jsonc, punctuation.definition.comment.jsonc | #a4b88f | italic |
| support.type.property-name.json | #9cb3e6 | — |
| string.quoted.double.json, string.quoted.single.json | #e8bfa6 | — |
| constant.numeric.json | #89d6e4 | — |
| constant.language.json, constant.language.boolean.json, constant.language.null.json, constant.language.true.json, constant.language.false.json | #a7e6c4 | — |
| punctuation.separator.key-value.json, punctuation.separator.dictionary.key-value.json, punctuation.separator.array.json | #cccccc | — |
| punctuation.definition.array.begin.json, punctuation.definition.array.end.json, punctuation.definition.dictionary.begin.json, punctuation.definition.dictionary.end.json | #cccccc | — |
| comment.line.double-slash.js, comment.block.js, comment.line.double-slash.jsx, comment.block.jsx, comment.line.double-slash.ts, comment.block.ts, comment.line.double-slash.tsx, comment.block.tsx | #a4b88f | italic |
| keyword.js, storage.type.js, storage.modifier.js, keyword.control.js, keyword.jsx, storage.type.jsx, storage.modifier.jsx, keyword.control.jsx, keyword.ts, storage.type.ts, storage.modifier.ts, keyword.control.ts, keyword.tsx, storage.type.tsx, storage.modifier.tsx, keyword.control.tsx, variable.language.this.js, variable.language.this.ts, variable.language.this.jsx, variable.language.this.tsx | #b69fd6 | — |
| string.quoted.single.js, string.quoted.double.js, string.template.js, string.quoted.single.jsx, string.quoted.double.jsx, string.template.jsx, string.quoted.single.ts, string.quoted.double.ts, string.template.ts, string.quoted.single.tsx, string.quoted.double.tsx, string.template.tsx | #e8bfa6 | — |
| punctuation.definition.template-expression.begin.js, punctuation.definition.template-expression.end.js, punctuation.definition.template-expression.begin.ts, punctuation.definition.template-expression.end.ts, punctuation.definition.template-expression.begin.jsx, punctuation.definition.template-expression.end.jsx, punctuation.definition.template-expression.begin.tsx, punctuation.definition.template-expression.end.tsx | #cccccc | — |
| constant.numeric.js, constant.numeric.jsx, constant.numeric.ts, constant.numeric.tsx | #89d6e4 | — |
| entity.name.function.js, meta.function-call.js, variable.function.js, support.function.js, entity.name.function.jsx, meta.function-call.jsx, variable.function.jsx, support.function.jsx, entity.name.function.ts, meta.function-call.ts, variable.function.ts, support.function.ts, entity.name.function.tsx, meta.function-call.tsx, variable.function.tsx, support.function.tsx | #d4c088 | — |
| entity.name.type.class.ts, entity.name.type.ts, support.class.ts, support.type.ts, support.type.primitive.ts, entity.other.inherited-class.ts, entity.name.type.class.tsx, entity.name.type.tsx, support.class.tsx, support.type.tsx, support.type.primitive.tsx, entity.other.inherited-class.tsx | #9cb3e6 | — |
| variable.other.readwrite.js, variable.other.readwrite.jsx, variable.other.readwrite.ts, variable.other.readwrite.tsx, variable.other.property.js, variable.other.property.jsx, variable.other.property.ts, variable.other.property.tsx | #e6a7c1 | — |
| constant.language.js, constant.language.jsx, constant.language.ts, constant.language.tsx, variable.other.constant.js, variable.other.constant.ts, variable.readonly.ts, variable.readonly.tsx | #a7e6c4 | — |
| keyword.operator.js, keyword.operator.jsx, keyword.operator.ts, keyword.operator.tsx, punctuation.separator.comma.js, punctuation.terminator.statement.js, punctuation.accessor.js, punctuation.separator.comma.ts, punctuation.terminator.statement.ts, punctuation.accessor.ts, punctuation.separator.comma.jsx, punctuation.accessor.jsx, punctuation.separator.comma.tsx, punctuation.accessor.tsx, punctuation.section.embedded.begin.jsx, punctuation.section.embedded.end.jsx, punctuation.section.embedded.begin.tsx, punctuation.section.embedded.end.tsx | #cccccc | — |
| comment, punctuation.definition.comment | #9aa0a6 | italic |
| comment.block.documentation, comment.block.documentation.js, comment.block.documentation.ts, comment.block.documentation.jsx, comment.block.documentation.tsx, comment.block.jsdoc, punctuation.definition.comment.jsdoc, entity.name.tag.jsdoc, variable.other.jsdoc, storage.type.class.jsdoc | #9aa0a6 | italic |
| keyword, storage.type, storage.modifier, keyword.control | #b69fd6 | — |
| keyword.control.return, keyword.control.return.ts, keyword.control.return.tsx, keyword.control.return.js, keyword.control.return.jsx | #b69fd6 | italic |
| string, string.quoted, string.template | #e8bfa6 | — |
| entity.name.function, meta.function-call, variable.function, support.function, entity.name.function.js, entity.name.function.ts, entity.name.function.tsx, entity.name.function.jsx, entity.name.function.php, entity.name.function.java, entity.name.function.cpp, entity.name.function.c, entity.name.function.cs, entity.name.function.python, entity.name.function.ruby, entity.name.function.go, entity.name.function.rs, entity.name.function.swift, entity.name.function.kotlin, meta.function-call.js, meta.function-call.ts, meta.function-call.tsx, meta.function-call.jsx, meta.function-call.php, meta.function-call.java, meta.function-call.cpp, meta.function-call.c, meta.function-call.cs, meta.function-call.python, meta.function-call.ruby, meta.function-call.go, meta.function-call.rs, meta.function-call.swift, meta.function-call.kotlin, support.function.js, support.function.ts, support.function.tsx, support.function.jsx, support.function.php, support.function.java, support.function.cpp, support.function.c, support.function.cs, support.function.python, support.function.ruby, support.function.go, support.function.rs, support.function.swift, support.function.kotlin, variable.function.js, variable.function.ts, variable.function.tsx, variable.function.jsx, variable.function.php, variable.function.java, variable.function.cpp, variable.function.c, variable.function.cs, variable.function.python, variable.function.ruby, variable.function.go, variable.function.rs, variable.function.swift, variable.function.kotlin | #d4c088 | — |
| entity.name.class, support.class, entity.name.type, support.type, support.type.primitive, entity.other.inherited-class, entity.name.class.js, entity.name.class.ts, entity.name.class.tsx, entity.name.class.jsx, entity.name.class.php, entity.name.class.java, entity.name.class.cpp, entity.name.class.c, entity.name.class.cs, entity.name.class.python, entity.name.class.ruby, entity.name.class.go, entity.name.class.rs, entity.name.class.swift, entity.name.class.kotlin, entity.name.interface, entity.name.interface.js, entity.name.interface.ts, entity.name.interface.tsx, entity.name.interface.jsx, entity.name.interface.php, entity.name.interface.java, entity.name.interface.cpp, entity.name.interface.c, entity.name.interface.cs, entity.name.interface.python, entity.name.interface.ruby, entity.name.interface.go, entity.name.interface.rs, entity.name.interface.swift, entity.name.interface.kotlin, entity.name.enum, entity.name.enum.js, entity.name.enum.ts, entity.name.enum.tsx, entity.name.enum.jsx, entity.name.enum.php, entity.name.enum.java, entity.name.enum.cpp, entity.name.enum.c, entity.name.enum.cs, entity.name.enum.python, entity.name.enum.ruby, entity.name.enum.go, entity.name.enum.rs, entity.name.enum.swift, entity.name.enum.kotlin, entity.name.struct, entity.name.struct.js, entity.name.struct.ts, entity.name.struct.tsx, entity.name.struct.jsx, entity.name.struct.php, entity.name.struct.java, entity.name.struct.cpp, entity.name.struct.c, entity.name.struct.cs, entity.name.struct.python, entity.name.struct.ruby, entity.name.struct.go, entity.name.struct.rs, entity.name.struct.swift, entity.name.struct.kotlin, entity.name.union, entity.name.union.js, entity.name.union.js, entity.name.union.ts, entity.name.union.tsx, entity.name.union.jsx, entity.name.union.php, entity.name.union.java, entity.name.union.cpp, entity.name.union.c, entity.name.union.cs, entity.name.union.python, entity.name.union.ruby, entity.name.union.go, entity.name.union.rs, entity.name.union.swift, entity.name.union.kotlin, entity.name.namespace, entity.name.namespace.js, entity.name.namespace.ts, entity.name.namespace.tsx, entity.name.namespace.jsx, entity.name.namespace.php, entity.name.namespace.java, entity.name.namespace.cpp, entity.name.namespace.c, entity.name.namespace.cs, entity.name.namespace.python, entity.name.namespace.ruby, entity.name.namespace.go, entity.name.namespace.rs, entity.name.namespace.swift, entity.name.namespace.kotlin, entity.name.module, entity.name.module.js, entity.name.module.ts, entity.name.module.tsx, entity.name.module.jsx, entity.name.module.php, entity.name.module.java, entity.name.module.cpp, entity.name.module.c, entity.name.module.cs, entity.name.module.python, entity.name.module.ruby, entity.name.module.go, entity.name.module.rs, entity.name.module.swift, entity.name.module.kotlin, entity.name.package, entity.name.package.js, entity.name.package.ts, entity.name.package.tsx, entity.name.package.jsx, entity.name.package.php, entity.name.package.java, entity.name.package.cpp, entity.name.package.c, entity.name.package.cs, entity.name.package.python, entity.name.package.ruby, entity.name.package.go, entity.name.package.rs, entity.name.package.swift, entity.name.package.kotlin, entity.name.trait, entity.name.trait.js, entity.name.trait.ts, entity.name.trait.tsx, entity.name.trait.jsx, entity.name.trait.php, entity.name.trait.java, entity.name.trait.cpp, entity.name.trait.c, entity.name.trait.cs, entity.name.trait.python, entity.name.trait.ruby, entity.name.trait.go, entity.name.trait.rs, entity.name.trait.swift, entity.name.trait.kotlin, entity.name.mixin, entity.name.mixin.js, entity.name.mixin.ts, entity.name.mixin.tsx, entity.name.mixin.jsx, entity.name.mixin.php, entity.name.mixin.java, entity.name.mixin.cpp, entity.name.mixin.c, entity.name.mixin.cs, entity.name.mixin.python, entity.name.mixin.ruby, entity.name.mixin.go, entity.name.mixin.rs, entity.name.mixin.swift, entity.name.mixin.kotlin | ||
| variable.other.readwrite, variable.other.property, variable.parameter, variable.other, support.variable | #e6a7c1 | — |
| constant.language, constant.other | #a7e6c4 | — |
| entity.name.tag.yaml | #9cb3e6 | — |
| comment.line.double-slash.js, comment.block.js, comment.line.double-slash.jsx, comment.block.jsx, comment.line.double-slash.ts, comment.block.ts, comment.line.double-slash.tsx, comment.block.tsx, punctuation.definition.comment.js, punctuation.definition.comment.jsx, punctuation.definition.comment.ts, punctuation.definition.comment.tsx | #9aa0a6 | italic |
| keyword.operator.js, keyword.operator.ts, keyword.operator.jsx, keyword.operator.tsx, punctuation.separator.comma.js, punctuation.separator.comma.ts, punctuation.separator.comma.jsx, punctuation.separator.comma.tsx, punctuation.terminator.statement.js, punctuation.terminator.statement.ts, punctuation.accessor.js, punctuation.accessor.ts, punctuation.accessor.jsx, punctuation.accessor.tsx, punctuation.section.embedded.begin.jsx, punctuation.section.embedded.end.jsx, punctuation.section.embedded.begin.tsx, punctuation.section.embedded.end.tsx, punctuation.definition.template-expression.begin.js, punctuation.definition.template-expression.end.js, punctuation.definition.template-expression.begin.ts, punctuation.definition.template-expression.end.ts, punctuation.definition.template-expression.begin.jsx, punctuation.definition.template-expression.end.jsx, punctuation.definition.template-expression.begin.tsx, punctuation.definition.template-expression.end.tsx | #dcdcdc | — |
| variable.other.constant.js, variable.other.constant.jsx, variable.other.constant.ts, variable.other.constant.tsx, variable.readonly.ts, variable.readonly.tsx | #e6a7c1E6 | italic |
| variable.other.property.js, variable.other.property.jsx, variable.other.property.ts, variable.other.property.tsx | #dcdcdc | |
| support.variable, support.variable.dom, support.type.object.dom, support.class.dom | #dcdcdc | |
| storage.type.function.arrow.js, storage.type.function.arrow.ts, storage.type.function.arrow.jsx, storage.type.function.arrow.tsx | #a0a0a0 | — |
| punctuation.section.block.begin.js, punctuation.section.block.end.js, punctuation.section.block.begin.ts, punctuation.section.block.end.ts, punctuation.section.block.begin.jsx, punctuation.section.block.end.jsx, punctuation.section.block.begin.tsx, punctuation.section.block.end.tsx, punctuation.section.group.begin.js, punctuation.section.group.end.js, punctuation.section.group.begin.ts, punctuation.section.group.end.ts, punctuation.section.group.begin.jsx, punctuation.section.group.end.jsx, punctuation.section.group.begin.tsx, punctuation.section.group.end.tsx, punctuation.definition.block.begin.js, punctuation.definition.block.end.js, punctuation.definition.block.begin.ts, punctuation.definition.block.end.ts, punctuation.definition.block.begin.jsx, punctuation.definition.block.end.jsx, punctuation.definition.block.begin.tsx, punctuation.definition.block.end.tsx | #dcdcdc | — |
| meta.variable.declaration.js variable.other.readwrite, meta.variable.declaration.jsx variable.other.readwrite, meta.variable.declaration.ts variable.other.readwrite, meta.variable.declaration.tsx variable.other.readwrite, meta.definition.variable.js variable.other.readwrite, meta.definition.variable.jsx variable.other.readwrite, meta.definition.variable.ts variable.other.readwrite, meta.definition.variable.tsx variable.other.readwrite, meta.binding.name.js variable.other.readwrite, meta.binding.name.jsx variable.other.readwrite, meta.binding.name.ts variable.other.readwrite, meta.binding.name.tsx variable.other.readwrite | #e6a7c1E6 | italic |
| keyword.control.extends, keyword.control.extends.js, keyword.control.extends.ts, keyword.control.extends.tsx, keyword.control.extends.jsx, keyword.control.extends.php, keyword.control.extends.java, keyword.control.extends.cpp, keyword.control.extends.c, keyword.control.extends.cs, keyword.control.extends.python, keyword.control.extends.ruby, keyword.control.extends.go, keyword.control.extends.rs, keyword.control.extends.swift, keyword.control.extends.kotlin, keyword.control.implements, keyword.control.implements.js, keyword.control.implements.ts, keyword.control.implements.tsx, keyword.control.implements.jsx, keyword.control.implements.php, keyword.control.implements.java, keyword.control.implements.cpp, keyword.control.implements.c, keyword.control.implements.cs, keyword.control.implements.python, keyword.control.implements.ruby, keyword.control.implements.go, keyword.control.implements.rs, keyword.control.implements.swift, keyword.control.implements.kotlin | #8B6914 | — |
| entity.name.function.decorator.python, meta.decorator.python, punctuation.definition.decorator.python | #b69fd6 | italic |
| support.function.builtin.python, support.function.magic.python, support.function.python | #9cb3e6 | — |
| support.type.python, support.type.builtin.python | #a7e6c4 | — |
| keyword.control.flow.python, keyword.control.statement.python, keyword.control.conditional.python, keyword.control.loop.python, keyword.control.exception.python, storage.type.function.python, storage.type.class.python, storage.modifier.python | #b69fd6 | — |
| keyword.control.import.python, keyword.control.import.from.python | #8c78e6 | italic |
| entity.name.class.python, entity.name.type.class.python | #9cb3e6 | — |
| entity.name.function.python, meta.function.python | #e6a7c1 | — |
| variable.parameter.python, variable.other.readwrite.python, variable.other.readwrite.global.python | #e8bfa6 | — |
| string.quoted.single.python, string.quoted.double.python, string.quoted.triple.single.python, string.quoted.triple.double.python, string.quoted.docstring.python | #a4b88f | — |
| constant.numeric.python, constant.numeric.integer.python, constant.numeric.float.python, constant.numeric.hex.python, constant.numeric.binary.python, constant.numeric.octal.python | #89d6e4 | — |
| comment.line.number-sign.python, comment.line.hashbang.python, punctuation.definition.comment.python | #a4b88f | italic |
| keyword.operator.logical.python, keyword.operator.arithmetic.python, keyword.operator.comparison.python, keyword.operator.assignment.python, keyword.operator.bitwise.python, keyword.operator.member.python | #cccccc | — |
| variable.language.self.python | #8c78e6 | italic |
| support.function.magic.python, entity.name.function.magic.python | #b69fd6 | italic |
| string.quoted.single.fstring.python, string.quoted.double.fstring.python, punctuation.definition.string.begin.fstring.python, punctuation.definition.string.end.fstring.python | #a4b88f | — |
| support.type.python, entity.name.type.python, meta.type.annotation.python | #a7e6c4 | — |
| meta.decorator, meta.decorator.typescript, entity.name.function.decorator, support.function.decorator, variable.other.decorator, punctuation.decorator, meta.decorator.expression, meta.decorator.typescript.expression, decorator | #b69fd6 | — |
| constant.numeric, constant.numeric.css, constant.numeric.integer.css, constant.numeric.float.css, constant.numeric.hex.css, constant.numeric.binary.css, constant.numeric.octal.css, keyword.other.unit.css, constant.numeric.scss, constant.numeric.integer.scss, constant.numeric.float.scss, constant.numeric.hex.scss, constant.numeric.binary.scss, constant.numeric.octal.scss, keyword.other.unit.scss, constant.numeric.less, constant.numeric.integer.less, constant.numeric.float.less, constant.numeric.hex.less, constant.numeric.binary.less, constant.numeric.octal.less, keyword.other.unit.less | #a08fd9 | — |
| entity.name.tag.vue, entity.name.tag.pug, entity.name.tag.jade | #9cb3e6 | — |
| entity.name.tag.script.vue, entity.name.tag.template.vue, entity.name.tag.style.vue | #9cb3e6 | — |
| entity.name.tag.angular, entity.name.tag.ng-template | #e8bfa6 | — |
| entity.name.tag.custom.jsx, entity.name.tag.custom.tsx | #9cb3e6 | — |
| entity.name.tag.xml, entity.name.tag.config, entity.name.tag.manifest | #b69fd6 | — |
| entity.name.tag.markdown, markup.heading.markdown, markup.italic.markdown, markup.bold.markdown | #b69fd6 | — |
| entity.name.tag.handlebars, entity.name.tag.mustache, entity.name.tag.ejs, entity.name.tag.nunjucks, entity.name.tag.twig | #8c78e6 | — |
| entity.name.tag.config.json, entity.name.tag.config.yaml, entity.name.tag.config.toml, entity.name.tag.config.ini | #8c78e6 | — |
| entity.name.tag.dockerfile, entity.name.tag.docker-compose | #a4b88f | — |
| entity.name.tag.generic, entity.name.tag.unknown | #a0a0a0 | — |
| entity.name.tag | #9cb3e6 | — |
TypeScript sample highlighted with this variant's colors and tokenColors.
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}!`;
}
| #9cb3e6 |
| — |
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}!`;
}