Dark Modern Neue
Publisher: Alberto CanteroThemes in package: 4
The Dark Modern refresh you've been waiting for — refined color hierarchies, a Tailwind/shadcn high contrast variant, and a Vercel-inspired monochrome minimal.
The Dark Modern refresh you've been waiting for — refined color hierarchies, a Tailwind/shadcn high contrast variant, and a Vercel-inspired monochrome minimal.
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.tag | #3b82f6 | — |
| entity.other.attribute-name | #7dd3fc | — |
| entity.name.tag.html | #3b82f6 | — |
| meta.embedded, source.groovy.embedded, string meta.image.inline.markdown, variable.legacy.builtin.python | #D4D4D4 | — |
| emphasis | — | italic |
| strong | — | bold |
| comment | #333333 | italic |
| constant.language | #3b82f6 | — |
| constant.numeric, keyword.operator.plus.exponent, keyword.operator.minus.exponent | #86efac | — |
| constant.regexp | #FF6B72 | — |
| entity.name.tag.css, entity.name.tag.less | #FEECA8 | — |
| entity.other.attribute-name.class.css, source.css entity.other.attribute-name.class, entity.other.attribute-name.id.css, entity.other.attribute-name.parent-selector.css, entity.other.attribute-name.parent.less, source.css entity.other.attribute-name.pseudo-class, entity.other.attribute-name.pseudo-element.css, source.css.less entity.other.attribute-name.id, entity.other.attribute-name.scss | #FEECA8 | — |
| invalid | #f44747 | — |
| markup.underline | — | underline |
| markup.bold | #3b82f6 | bold |
| markup.heading | #3b82f6 | bold |
| markup.italic | — | italic |
| markup.strikethrough | — | strikethrough |
| markup.inserted | #86efac | — |
| markup.deleted | #F4806E | — |
| markup.changed | #3b82f6 | — |
| punctuation.definition.quote.begin.markdown | #059669 | — |
| punctuation.definition.list.begin.markdown | #7dd3fc | — |
| markup.inline.raw | #F4806E | — |
| punctuation.definition.tag | #d6d3d1 | — |
| meta.preprocessor, entity.name.function.preprocessor | #3b82f6 | — |
| meta.preprocessor.string | #F4806E | — |
| meta.preprocessor.numeric | #86efac | — |
| meta.structure.dictionary.key.python | #7dd3fc | — |
| meta.diff.header | #3b82f6 | — |
| storage | #3b82f6 | — |
| storage.type | #3b82f6 | — |
| storage.modifier, keyword.operator.noexcept | #3b82f6 | — |
| string, meta.embedded.assembly | #F4806E | — |
| string.tag | #F4806E | — |
| string.value | #F4806E | — |
| string.regexp | #FF6B72 | — |
| punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded | #3b82f6 | — |
| meta.template.expression | #d4d4d4 | — |
| support.type.vendored.property-name, support.type.property-name, source.css variable, source.coffee.embedded | #7dd3fc | — |
| keyword | #3b82f6 | — |
| keyword.control | #3b82f6 | — |
| keyword.operator | #d4d4d4 | — |
| keyword.operator.new, keyword.operator.expression, keyword.operator.cast, keyword.operator.sizeof, keyword.operator.alignof, keyword.operator.typeid, keyword.operator.alignas, keyword.operator.instanceof, keyword.operator.logical.python, keyword.operator.wordlike | #3b82f6 | — |
| keyword.other.unit | #86efac | — |
| punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php | #3b82f6 | — |
| support.function.git-rebase | #7dd3fc | — |
| constant.sha.git-rebase | #86efac | — |
| storage.modifier.import.java, variable.language.wildcard.java, storage.modifier.package.java | #d4d4d4 | — |
| variable.language, variable.parameter.function.language.special.self.python, variable.parameter.function.language.special.cls.python | #3b82f6 | italic |
| meta.function-call.generic.python | #7dd3fc | — |
| variable.parameter.function-call.python | #FEECA8 | — |
| entity.name.function, support.function, support.constant.handlebars, source.powershell variable.other.member, entity.name.operator.custom-literal | #FEECA8 | — |
| 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 | #82dfd0 | — |
| 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 | #82dfd0 | — |
| keyword.control, source.cpp keyword.operator.new, keyword.operator.delete, keyword.other.using, keyword.other.directive.using, keyword.other.operator, entity.name.operator | #EB91FA | — |
| variable, meta.definition.variable.name, support.variable, entity.name.variable, constant.other.placeholder | #7dd3fc | — |
| variable.other.constant, variable.other.enummember | #38bdf8 | — |
| meta.object-literal.key | #7dd3fc | — |
| 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 | #F4806E | — |
| punctuation.definition.group.regexp, punctuation.definition.group.assertion.regexp, punctuation.definition.character-class.regexp, punctuation.character.set.begin.regexp, punctuation.character.set.end.regexp, keyword.operator.negation.regexp, support.other.parenthesis.regexp | #F4806E | — |
| constant.character.character-class.regexp, constant.other.character-class.set.regexp, constant.other.character-class.regexp, constant.character.set.regexp | #FF6B72 | — |
| keyword.operator.or.regexp, keyword.control.anchor.regexp | #FEECA8 | — |
| keyword.operator.quantifier.regexp | #FEECA8 | — |
| constant.character, constant.other.option | #3b82f6 | — |
| constant.character.escape | #FEECA8 | — |
| entity.name.label | #d6d3d1 | — |
| string.quoted.binary.single.python | #059669FF | |
| constant.language.false.cpp, constant.language.true.cpp | #82dfd0 | |
| punctuation.definition.delayed.unison,punctuation.definition.list.begin.unison,punctuation.definition.list.end.unison,punctuation.definition.ability.begin.unison,punctuation.definition.ability.end.unison,punctuation.operator.assignment.as.unison,punctuation.separator.pipe.unison,punctuation.separator.delimiter.unison,punctuation.definition.hash.unison | #D4D4D4 | — |
| keyword.control.directive | #059669FF | — |
| constant.other.ellipsis.python | #D4D4D4 | |
| variable.other.generic-type.haskell | #82dfd0 | — |
| storage.type.haskell | #FEECA8 | — |
| support.variable.magic.python | #D4D4D4 | — |
| punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python | #D4D4D4 | — |
| variable.language.this.cpp | #82dfd0 | |
| storage.modifier.lifetime.rust | #D4D4D4 | — |
| support.function.std.rust | #EB91FA | — |
| entity.name.lifetime.rust | #F4806E | — |
| variable.other.property | #7274b5 | italic |
| variable.language.rust | #D4D4D4 | — |
| support.constant.edge | #82dfd0 | — |
| variable.parameter.function | #D4D4D4 | — |
| comment markup.link | #333333 | — |
| markup.changed.diff | #F4806E | — |
| meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff | #EB91FA | — |
| markup.inserted.diff | #EB91FA | — |
| markup.deleted.diff | #D4D4D4 | — |
| meta.function.c,meta.function.cpp | #D4D4D4 | — |
| 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 | #D4D4D4 | — |
| punctuation.separator.key-value | #D4D4D4 | — |
| keyword.operator.expression.import | #EB91FA | — |
| support.constant.property.math | #FEECA8 | — |
| source.java | #D4D4D4 | — |
| punctuation.section.block.begin.java,punctuation.section.block.end.java,punctuation.definition.method-parameters.begin.java,punctuation.definition.method-parameters.end.java,meta.method.identifier.java,punctuation.section.method.begin.java,punctuation.section.method.end.java,punctuation.terminator.java,punctuation.section.class.begin.java,punctuation.section.class.end.java,punctuation.section.inner-class.begin.java,punctuation.section.inner-class.end.java,meta.method-call.java,punctuation.section.class.begin.bracket.curly.java,punctuation.section.class.end.bracket.curly.java,punctuation.section.method.begin.bracket.curly.java,punctuation.section.method.end.bracket.curly.java,punctuation.separator.period.java,punctuation.bracket.angle.java,punctuation.definition.annotation.java,meta.method.body.java | #D4D4D4 | — |
| meta.method.java | #EB91FA | — |
| storage.type.java, storage.type.generic.java | #82dfd0 | — |
| keyword.operator.instanceof.java | #82dfd0 | — |
| meta.definition.variable.name.java | #D4D4D4 | — |
| variable.other.object.property.java | #7274b5 | italic |
| keyword.operator.logical | #D4D4D4 | — |
| keyword.operator.bitwise | #D4D4D4 | — |
| keyword.operator.channel | #D4D4D4 | — |
| keyword.operator.css,keyword.operator.scss,keyword.operator.less | #D4D4D4 | — |
| support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss | #FEECA8 | — |
| punctuation.separator.list.comma.css | #D4D4D4 | — |
| support.constant.color.w3c-standard-color-name.css | #FEECA8 | — |
| support.module.node,support.type.object.module,support.module.node | #F4806E | — |
| entity.name.type.module | #F4806E | — |
| ,meta.object-literal.key,support.variable.object.process,support.variable.object.node | #D4D4D4 | — |
| source.js variable.other.readwrite, source.ts variable.other.readwrite, source.jsx variable.other.readwrite, source.tsx variable.other.readwrite | #3b82f6 | — |
| support.variable.property | #7274b5 | italic |
| keyword.operator.expression.instanceof, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof | #82dfd0 | — |
| support.type.object.console | #D4D4D4 | — |
| support.variable.property.process | #FEECA8 | — |
| entity.name.function.js,support.function.console.js | #FEECA8 | — |
| keyword.operator.misc.rust | #D4D4D4 | — |
| keyword.operator.sigil.rust | #82dfd0 | — |
| support.type.object.dom | #D4D4D4 | — |
| support.variable.dom,support.variable.property.dom | #D4D4D4 | — |
| keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational | #D4D4D4 | — |
| keyword.operator.assignment.c,keyword.operator.comparison.c,keyword.operator.c,keyword.operator.increment.c,keyword.operator.decrement.c,keyword.operator.bitwise.shift.c,keyword.operator.assignment.cpp,keyword.operator.comparison.cpp,keyword.operator.cpp,keyword.operator.increment.cpp,keyword.operator.decrement.cpp,keyword.operator.bitwise.shift.cpp | #82dfd0 | — |
| punctuation.separator.delimiter | #D4D4D4 | — |
| punctuation.separator.c,punctuation.separator.cpp | #82dfd0 | — |
| support.type.posix-reserved.c,support.type.posix-reserved.cpp | #D4D4D4 | — |
| keyword.operator.sizeof.c,keyword.operator.sizeof.cpp | #82dfd0 | — |
| variable.parameter.function.language.python | #FEECA8 | — |
| support.type.python | #82dfd0 | — |
| variable.parameter.function.python | #FEECA8 | — |
| punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python | #D4D4D4 | — |
| constant.character.format.placeholder.other.python | #FEECA8 | — |
| keyword.operator.assignment.compound | #82dfd0 | — |
| keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts | #D4D4D4 | — |
| variable.c | #D4D4D4 | — |
| token.variable.parameter.java | #D4D4D4 | — |
| import.storage.java | #D4D4D4 | — |
| token.package.keyword | #82dfd0 | — |
| token.package | #D4D4D4 | — |
| meta.require, variable.function | #F4806E | — |
| entity.name.type.namespace | #F4806E | — |
| entity.name.class.identifier.namespace.type | #F4806E | — |
| variable.other.class.js, variable.other.class.ts | #82dfd0 | — |
| variable.other.class.php | #D4D4D4 | — |
| keyword.control.directive.include.cpp | #059669FF | — |
| control.elements, keyword.operator.less | #FEECA8 | — |
| keyword.other.special-method | #EB91FA | — |
| storage.modifier.reference, storage.modifier.pointer | #D4D4D4 | |
| token.storage | #82dfd0 | — |
| keyword.operator.expression.delete,keyword.operator.expression.in,keyword.operator.expression.of,keyword.operator.expression.instanceof,keyword.operator.new,keyword.operator.expression.typeof,keyword.operator.expression.void | #82dfd0 | — |
| token.storage.type.java | #D4D4D4 | — |
| meta.property-name.css | #3b82f6 | |
| meta.tag | #FEECA8 | — |
| constant.other.symbol | #D4D4D4 | — |
| constant.other.color | #FEECA8 | — |
| punctuation.definition.constant | #FEECA8 | — |
| entity.name.tag.template, entity.name.tag.script, entity.name.tag.style | #EB91FA | — |
| meta.property-value.css | #EB91FA | |
| entity.other.attribute-name.id | #EB91FA | |
| meta.selector | #82dfd0 | — |
| markup.heading punctuation.definition.heading, entity.name.section | #EB91FA | — |
| markup.bold,todo.bold | #FEECA8 | — |
| punctuation.definition.bold | #F4806E | — |
| markup.italic, punctuation.definition.italic,todo.emphasis | #82dfd0 | — |
| emphasis md | #82dfd0 | — |
| entity.name.section.markdown | #D4D4D4 | — |
| punctuation.definition.heading.markdown | #D4D4D4 | — |
| markup.heading.setext | #D4D4D4 | — |
| punctuation.definition.bold.markdown | #FEECA8 | — |
| markup.inline.raw.markdown | #EB91FA | — |
| markup.inline.raw.string.markdown | #EB91FA | — |
| punctuation.definition.list.markdown | #D4D4D4 | — |
| punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown | #D4D4D4 | — |
| beginning.punctuation.definition.list.markdown | #D4D4D4 | — |
| punctuation.definition.metadata.markdown | #D4D4D4 | — |
| markup.underline.link.markdown,markup.underline.link.image.markdown | #82dfd0 | — |
| string.other.link.title.markdown,string.other.link.description.markdown | #EB91FA | — |
| punctuation.section.embedded, variable.interpolation | #D4D4D4 | — |
| punctuation.section.embedded.begin,punctuation.section.embedded.end | #82dfd0 | — |
| invalid.illegal | #D4D4D4 | — |
| invalid.illegal.bad-ampersand.html | #D4D4D4 | — |
| invalid.broken | #D4D4D4 | — |
| invalid.deprecated | #D4D4D4 | — |
| invalid.unimplemented | #D4D4D4 | — |
| source.json meta.structure.dictionary.json > string.quoted.json | #D4D4D4 | — |
| source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string | #D4D4D4 | — |
| 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 | #EB91FA | — |
| source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json | #D4D4D4 | — |
| support.type.property-name.json | #7dd3fc | — |
| text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade | #82dfd0 | — |
| text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade | #82dfd0 | — |
| support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php | #F4806E | — |
| keyword.operator.error-control.php | #82dfd0 | — |
| keyword.operator.type.php | #82dfd0 | — |
| punctuation.section.array.begin.php | #D4D4D4 | — |
| punctuation.section.array.end.php | #D4D4D4 | — |
| invalid.illegal.non-null-typehinted.php | #f44747 | — |
| storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php | #F4806E | — |
| meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php | #EB91FA | — |
| punctuation.definition.parameters.begin.bracket.round.php,punctuation.definition.parameters.end.bracket.round.php,punctuation.separator.delimiter.php,punctuation.section.scope.begin.php,punctuation.section.scope.end.php,punctuation.terminator.expression.php,punctuation.definition.arguments.begin.bracket.round.php,punctuation.definition.arguments.end.bracket.round.php,punctuation.definition.storage-type.begin.bracket.round.php,punctuation.definition.storage-type.end.bracket.round.php,punctuation.definition.array.begin.bracket.round.php,punctuation.definition.array.end.bracket.round.php,punctuation.definition.begin.bracket.round.php,punctuation.definition.end.bracket.round.php,punctuation.definition.begin.bracket.curly.php,punctuation.definition.end.bracket.curly.php,punctuation.definition.section.switch-block.end.bracket.curly.php,punctuation.definition.section.switch-block.start.bracket.curly.php,punctuation.definition.section.switch-block.begin.bracket.curly.php,punctuation.definition.section.switch-block.end.bracket.curly.php | #D4D4D4 | — |
| support.constant.core.rust | #FEECA8 | — |
| support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php | #FEECA8 | — |
| entity.name.goto-label.php,support.other.php | #EB91FA | — |
| keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php | #D4D4D4 | — |
| keyword.operator.regexp.php | #82dfd0 | — |
| keyword.operator.comparison.php | #D4D4D4 | — |
| keyword.operator.heredoc.php,keyword.operator.nowdoc.php | #82dfd0 | — |
| support.token.decorator.python,meta.function.decorator.identifier.python | #D4D4D4 | — |
| function.parameter | #D4D4D4 | — |
| function.brace | #D4D4D4 | — |
| function.parameter.ruby, function.parameter.cs | #D4D4D4 | — |
| constant.language.symbol.ruby | #D4D4D4 | — |
| rgb-value | #D4D4D4 | — |
| inline-color-decoration rgb-value | #FEECA8 | — |
| less rgb-value | #FEECA8 | — |
| selector.sass | #D4D4D4 | — |
| support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx | #82dfd0 | — |
| block.scope.end,block.scope.begin | #D4D4D4 | — |
| entity.name.variable.local.cs | #D4D4D4 | — |
| token.info-token | #EB91FA | — |
| token.warn-token | #FEECA8 | — |
| token.error-token | #f44747 | — |
| token.debug-token | #82dfd0 | — |
| keyword.operator.module | #82dfd0 | — |
| support.type.type.flowtype | #EB91FA | — |
| support.type.primitive | #F4806E | — |
| meta.property.object | #D4D4D4 | — |
| variable.parameter.function.js | #D4D4D4 | — |
| keyword.operator.assignment | #D4D4D4 | — |
| keyword.operator.assignment.go | #F4806E | — |
| keyword.operator.arithmetic.go, keyword.operator.address.go | #82dfd0 | — |
| entity.name.package.go | #F4806E | — |
| support.type.prelude.elm | #D4D4D4 | — |
| support.constant.elm | #FEECA8 | — |
| punctuation.quasi.element | #82dfd0 | — |
| constant.character.entity | #D4D4D4 | — |
| entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class | #D4D4D4 | — |
| entity.global.clojure | #F4806E | — |
| meta.symbol.clojure | #D4D4D4 | — |
| constant.keyword.clojure | #D4D4D4 | — |
| meta.arguments.coffee, variable.parameter.function.coffee | #D4D4D4 | — |
| source.ini | #EB91FA | — |
| meta.scope.prerequisites.makefile | #D4D4D4 | — |
| source.makefile | #F4806E | — |
| storage.modifier.import.groovy | #F4806E | — |
| meta.method.groovy | #EB91FA | — |
| meta.definition.variable.name.groovy | #D4D4D4 | — |
| meta.definition.class.inherited.classes.groovy | #EB91FA | — |
| support.variable.semantic.hlsl | #F4806E | — |
| support.type.texture.hlsl, support.type.sampler.hlsl, support.type.object.hlsl, support.type.object.rw.hlsl, support.type.fx.hlsl, support.type.object.hlsl | #82dfd0 | — |
| text.variable, text.bracketed | #D4D4D4 | — |
| support.type.swift, support.type.vb.asp | #F4806E | — |
| entity.name.function.xi | #F4806E | — |
| entity.name.class.xi | #D4D4D4 | — |
| constant.character.character-class.regexp.xi | #D4D4D4 | — |
| constant.regexp.xi | #82dfd0 | — |
| keyword.control.xi | #D4D4D4 | — |
| invalid.xi | #D4D4D4 | — |
| beginning.punctuation.definition.quote.markdown.xi | #EB91FA | — |
| beginning.punctuation.definition.list.markdown.xi | #333333 | — |
| constant.character.xi | #EB91FA | — |
| accent.xi | #EB91FA | — |
| wikiword.xi | #FEECA8 | — |
| constant.other.color.rgb-value.xi | #D4D4D4 | — |
| punctuation.definition.tag.xi | #d6d3d1 | — |
| entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition | #F4806E | — |
| entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown | #D4D4D4 | — |
| meta.brace.square | #D4D4D4 | — |
| markup.quote.markdown | #404040 | — |
| punctuation.definition.block.sequence.item.yaml | #D4D4D4 | — |
| constant.language.symbol.elixir | #D4D4D4 | — |
| comment.line.double-slash | — | italic |
| markup.italic.markdown | — | italic |
| keyword.other.documentation.javadoc.java, punctuation.definition.block.tag.javadoc, storage.type.class.jsdoc | #10b981 | — |
| comment.block.javadoc.java, string.quoted.docstring, comment.block.documentation | #059669FF | — |
| storage.type.primitive.java | #3b82f6 | — |
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}!`;
}