Fleetty Theme
Publisher: fleettyThemes in package: 3
A pixel-faithful, unofficial VS Code port of the JetBrains Fleet color theme — Dark, Dark Purple, and Light.
A pixel-faithful, unofficial VS Code port of the JetBrains Fleet color theme — Dark, Dark Purple, and Light.
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 |
|---|---|---|
| storage.modifier.attribute.cpp, entity.other.attribute-name.cpp | #8C4F7F | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.id.css, entity.other.attribute-name.css | #5511BF | — |
| entity.other.attribute-name.html, entity.other.attribute-name.xml, entity.other.attribute-name.jsx, entity.other.attribute-name.tsx, entity.other.attribute-name.vue, entity.other.attribute-name.svelte, meta.tag.html entity.other.attribute-name.html, meta.tag.structure.html entity.other.attribute-name.html, meta.tag.metadata.html entity.other.attribute-name.html, meta.tag.inline.html entity.other.attribute-name.html, meta.tag.block.html entity.other.attribute-name.html, meta.tag.any.html entity.other.attribute-name.html | #5511BF | — |
| string.quoted.html, string.quoted.xml, string.quoted.jsx, string.quoted.tsx, string.quoted.vue, string.quoted.svelte, meta.tag.html string.quoted.html, meta.tag.html string.quoted.double.html, meta.tag.html string.quoted.single.html, meta.tag.structure.html string.quoted.html, meta.tag.metadata.html string.quoted.html, meta.tag.inline.html string.quoted.html, meta.tag.block.html string.quoted.html, meta.tag.any.html string.quoted.html, meta.tag.html punctuation.definition.string.begin.html, meta.tag.html punctuation.definition.string.end.html | #086E14 | — |
| constant.language.boolean, constant.language.boolean.kotlin, constant.language.boolean.java, constant.language.boolean.js, constant.language.boolean.ts, constant.language.boolean.python, constant.language.boolean.go, constant.language.boolean.rust, constant.language.boolean.c, constant.language.boolean.cpp, constant.language.boolean.cs, constant.language.boolean.swift, constant.language.boolean.php, constant.language.boolean.ruby, constant.language.boolean.yaml, constant.language.boolean.toml | #14646E | — |
| comment, punctuation.definition.comment, comment.line.double-slash.kotlin, comment.block.kotlin, comment.line.double-slash.java, comment.block.java, 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, comment.line.number-sign.python, comment.line.double-slash.go, comment.line.double-slash.rust, comment.block.rust, comment.line.double-slash.c, comment.block.c, comment.line.double-slash.cpp, comment.block.cpp, comment.line.double-slash.cs, comment.block.cs, comment.line.double-slash.swift, comment.block.swift, comment.line.number-sign.ruby, comment.line.number-sign.shell, comment.line.double-dash.sql, comment.block.sql, comment.line.number-sign.dockerfile, comment.line.number-sign.toml, comment.line.semicolon.ini, comment.line.number-sign.properties | #0000008B | — |
| comment.line.double-slash.go | #090909 | — |
| comment.block.documentation, comment.line.documentation, comment.block.documentation.kotlin, comment.block.documentation.java, comment.block.documentation.js, comment.block.documentation.ts, comment.block.documentation.cs, comment.block.documentation.php, comment.block.documentation.rust, comment.line.documentation.swift, string.quoted.docstring.multi.python, string.quoted.docstring.multi.python punctuation.definition.string.begin.python, string.quoted.docstring.multi.python punctuation.definition.string.end.python | #0000008B | — |
| keyword.other.documentation, storage.type.class.jsdoc, entity.name.tag.documentation, keyword.other.documentation.java, keyword.other.documentation.js, keyword.other.documentation.ts, entity.name.tag.documentation.php | #14646E | — |
| variable.other.jsdoc, string.other.link.title.markdown | #090909 | — |
| keyword.other.todo, comment.line.todo, keyword.other.todo.java, keyword.other.todo.kotlin, keyword.other.todo.python, keyword.other.todo.rust, keyword.other.todo.go, keyword.other.todo.c, keyword.other.todo.cpp, keyword.other.todo.cs, keyword.other.todo.swift | #BD4A2D | — |
| constant.character.entity.html, constant.character.entity.xml, punctuation.definition.entity.html | #664229 | — |
| storage.type.generic.php | #A31D8D | — |
| constant.other.color.rgb-value.css, meta.property-value.css constant.other.color.rgb-value.css, meta.property-list.css constant.other.color.rgb-value.css, source.css.embedded.html constant.other.color.rgb-value.css, constant.other.color.rgb-value.hex.css | #A31D8D | — |
| variable, variable.other.kotlin, constant.other.caps, constant.other.caps.python | #090909 | — |
| entity.name.type.anchor.yaml | #BF4A02 | — |
| entity.name.type.anchor.yaml | #1749BD | — |
| constant.other, variable.other.constant, variable.other.constant.kotlin, variable.other.constant.java, variable.other.constant.js, variable.other.constant.ts, variable.other.constant.python, variable.other.constant.go, variable.other.constant.rust, variable.other.constant.cs, variable.other.constant.swift, constant.other.symbol.ruby | #A31D8D | — |
| constant.language, support.constant, constant.language.kotlin, support.constant.kotlin, constant.language.null, constant.language.null.java, constant.language.null.kotlin, constant.language.null.js, constant.language.null.ts, constant.language.none.python, constant.language.nil.go, constant.language.nil.ruby, constant.language.unit.rust, constant.language.undefined.js, support.constant.math | #14646E | — |
| variable.css, source.css variable.css, source.css.embedded.html variable.css, meta.property-value.css variable.css, meta.property-value.css variable.other.custom-property.css | #5511BF | — |
| markup.inserted.amper | #1749BD | — |
| entity.name.function.amper | #1749BD | — |
| entity.name.namespace.amper | #BF4A02 | — |
| variable.other.property, meta.object-literal.key, support.variable.property, variable.other.property.kotlin, variable.other.object.property, variable.other.property.java, variable.other.property.js, variable.other.property.ts, variable.other.property.python, variable.other.property.go, variable.other.property.rust, variable.other.property.cs, variable.other.property.swift, variable.other.member.c, variable.other.member.cpp | #A31D8D | — |
| variable.other.property.static, support.variable.property.static, variable.other.property.static.kotlin | #A31D8D | italic |
| entity.name.function, support.function, variable.function, entity.name.function.kotlin, support.function.kotlin, meta.function-call, meta.function-call entity.name.function, entity.name.function.java, entity.name.function.method.java, entity.name.function.js, entity.name.function.ts, entity.name.function.python, entity.name.function.go, entity.name.function.rust, entity.name.function.c, entity.name.function.cpp, entity.name.function.cs, entity.name.function.swift, entity.name.function.php, entity.name.function.ruby, support.function.builtin.shell, entity.name.function.sql | #5511BF | — |
| entity.name.function.composable | #616605 | — |
| support.function.package, entity.name.function.package | #5511BF | — |
| support.function.misc.css, entity.name.function.css, meta.function-call.css entity.name.function.css, meta.property-value.css support.function.misc.css, source.css.embedded.html support.function.misc.css | #5511BF | — |
| entity.name.function, meta.function entity.name.function, entity.name.function.declaration.kotlin, meta.function entity.name.function.java, meta.function entity.name.function.kotlin, meta.function entity.name.function.js, meta.function entity.name.function.ts, meta.function entity.name.function.python, meta.function entity.name.function.go, meta.function entity.name.function.rust, meta.function entity.name.function.c, meta.function entity.name.function.cpp, meta.function entity.name.function.cs, meta.function entity.name.function.swift, meta.function entity.name.function.php, meta.function entity.name.function.ruby, entity.name.function.definition.shell | #090909 | bold |
| entity.name.function.js, meta.function.js entity.name.function.js | #5511BF | bold |
| entity.name.type.interface, support.type.interface, entity.name.type.interface.kotlin, entity.name.type.interface.java, entity.name.type.interface.ts, entity.name.type.interface.cs, entity.name.type.protocol.swift, entity.name.type.trait.rust | #1749BD | — |
| entity.name.function.member.static, support.function.static, entity.name.function.static.kotlin, entity.name.function.static.java, entity.name.function.static.cs, entity.name.function.static.swift | #5511BF | italic |
| variable.parameter.receiver.go | #090909 | — |
| variable.parameter.named, entity.other.attribute-name.named, variable.parameter.named.kotlin, variable.parameter.function-call.python, variable.parameter.named.cs, variable.parameter.named.swift, variable.parameter.named.ruby | #664229 | — |
| variable.other | #1749BD | — |
| entity.name.package.go, entity.name.namespace, entity.name.namespace.java, entity.name.namespace.kotlin, entity.name.namespace.csharp, entity.name.namespace.cpp, entity.name.package, entity.name.package.java, entity.name.package.kotlin, support.module.node.js, support.module.node.ts | #664229 | — |
| variable.parameter, variable.parameter.kotlin, variable.parameter.java, variable.parameter.js, variable.parameter.ts, variable.parameter.python, variable.parameter.go, variable.parameter.rust, variable.parameter.c, variable.parameter.cpp, variable.parameter.cs, variable.parameter.swift, variable.parameter.php, variable.parameter.ruby | #090909 | — |
| variable.parameter.js | #616605 | — |
| variable.language.this, variable.language.self, variable.language.super, variable.language.this.kotlin, variable.language.super.kotlin, variable.language.this.java, variable.language.this.js, variable.language.this.ts, variable.language.self.python, variable.language.self.ruby, variable.language.self.swift | #8C4F7F | — |
| variable.language.this.mutable | #8C4F7F | — |
| entity.name.type, support.type, entity.name.type.kotlin, support.type.kotlin, support.class.kotlin, support.type.builtin, support.type.builtin.java, support.type.builtin.kotlin, support.type.builtin.python, support.type.builtin.go, support.type.builtin.rust, support.type.builtin.c, support.type.builtin.cpp, support.type.builtin.cs, support.type.builtin.swift, support.type.builtin.php, support.type.builtin.ruby | #1749BD | — |
| entity.name.type.class, support.class, entity.name.class.kotlin, entity.name.type.class.kotlin, entity.name.type.class.java, entity.name.type.class.js, entity.name.type.class.ts, entity.name.type.class.python, entity.name.type.class.go, entity.name.type.class.rust, entity.name.type.class.cpp, entity.name.type.class.cs, entity.name.type.class.swift, entity.name.type.class.php, entity.name.type.class.ruby, support.class.component.tsx, support.class.component.jsx | #1749BD | — |
| entity.name.type.enum, entity.name.type.enum.kotlin, entity.name.type.enum.java, entity.name.type.enum.cs, entity.name.type.enum.swift, entity.name.type.enum.rust | #1749BD | — |
| entity.name.type.struct, storage.type.struct, entity.name.type.struct.go, entity.name.type.struct.rust, entity.name.type.struct.c, entity.name.type.struct.cpp, entity.name.type.struct.swift | #1749BD | — |
| support.type.primitive, storage.type.primitive, storage.type.primitive.kotlin | #664229 | — |
| entity.name.type.go | #090909 | — |
| entity.name.type.parameter, support.type.type-parameter, entity.name.type.parameter.kotlin, entity.name.type.parameter.java, entity.name.type.parameter.ts, entity.name.type.parameter.cs, entity.name.type.parameter.rust, entity.name.type.parameter.swift | #664229 | — |
| entity.name.type.go, support.type.go | #1749BD | — |
| variable.other.readwrite, variable.other.readwrite.java, variable.other.readwrite.kotlin, variable.other.readwrite.js, variable.other.readwrite.ts, variable.other.readwrite.python, variable.other.readwrite.go, variable.other.readwrite.rust, variable.other.readwrite.c, variable.other.readwrite.cpp, variable.other.readwrite.cs, variable.other.readwrite.swift, variable.other.readwrite.php, variable.other.readwrite.ruby, variable.other.normal.shell | #090909 | — |
| variable.parameter.url.css, variable.css, meta.function-call.css variable.parameter.css, meta.property-value.css variable.parameter.css, meta.property-value.css variable.parameter.url.css, source.css.embedded.html variable.parameter.css, source.css.embedded.html variable.parameter.url.css, variable.parameter.css | #1749BD | — |
| variable.other.php | #664229 | — |
| variable.other.shadowed.go | #616605 | — |
| source.css.embedded, meta.embedded.css, source.css.embedded.html | #090909 | — |
| punctuation.section.embedded.begin.css, punctuation.section.embedded.end.css | #086E14 | — |
| source.js.embedded.css, meta.embedded.js.css | #090909 | — |
| support.type.property-name.json, meta.structure.dictionary.key.json string.quoted.double.json, support.type.property-name.jsonc, meta.structure.dictionary.key.jsonc string.quoted.double.jsonc | #5511BF | — |
| entity.name.tag.yaml, support.type.property-name.yaml, support.type.property-name.toml, entity.name.section.group-title.ini, keyword.other.definition.ini, support.type.property-name.properties | #14646E | — |
| keyword, storage.type, storage.modifier, keyword.control.kotlin, keyword.other.kotlin, storage.type.kotlin, storage.modifier.kotlin, keyword.control.import.java, keyword.control.import.kotlin, keyword.control.import.js, keyword.control.import.ts, keyword.control.from.python, keyword.control.import.python, keyword.control.flow.python, keyword.control.conditional.python, keyword.control.repeat.python, keyword.control.exception.python, keyword.control.return.python, keyword.operator.logical.python, storage.type.function.python, keyword.control.rust, keyword.control.go, keyword.control.c, keyword.control.cpp, keyword.control.cs, keyword.control.swift, keyword.control.php, keyword.control.ruby, keyword.control.shell, keyword.other.DML.sql, keyword.other.DDL.sql, keyword.other.dockerfile, keyword.other.special-method.dockerfile, storage.type.java, storage.type.cs, storage.type.swift, storage.type.rust, storage.type.go, storage.type.c, storage.type.cpp, storage.type.php, storage.type.sql, storage.modifier.java, storage.modifier.cs, storage.modifier.swift, storage.modifier.rust | #14646E | — |
| keyword.control.at-rule.css, keyword.other.css, keyword.control.at-rule.media.css, keyword.control.at-rule.import.css, keyword.control.at-rule.charset.css, keyword.control.at-rule.supports.css, keyword.control.at-rule.keyframes.css, meta.at-rule.media.css keyword.control.at-rule.media.css, meta.at-rule.css keyword.control.at-rule.css | #616605 | — |
| keyword.control.extend.css | #616605 | — |
| keyword.control.global.css | #616605 | — |
| keyword.other.important.css | #5511BF | — |
| storage.modifier, keyword.other.type.modifier, storage.modifier.kotlin, storage.modifier.access.java, storage.modifier.access.kotlin, storage.modifier.access.cs, storage.modifier.async.js, storage.modifier.async.ts, storage.modifier.async.cs, storage.modifier.static.java, storage.modifier.static.kotlin, storage.modifier.static.cs, storage.modifier.final.java, storage.modifier.final.kotlin, storage.modifier.readonly.cs, storage.modifier.mut.rust, storage.modifier.unsafe.rust | #14646E | — |
| markup.underline.link, string.other.link, markup.underline.link.http.hyperlink, meta.link.inline.markdown | #1D61BA | — |
| markup.underline.link.hovered | #1D61BA | — |
| markup.bold, punctuation.definition.bold, punctuation.definition.bold.markdown | — | bold |
| markup.fenced_code.block.markdown, markup.raw.block.markdown, markup.raw.inline.markdown, markup.fenced_code.block.markdown punctuation.definition.markdown | #78492A | — |
| markup.heading, entity.name.section.markdown, punctuation.definition.heading.markdown, markup.heading.setext | #5511BF | — |
| markup.underline.link.markdown, string.other.link.title.markdown, string.other.link.description.markdown, markup.underline.link.image.markdown | #78492A | italic |
| markup.italic, punctuation.definition.italic, punctuation.definition.italic.markdown | — | italic |
| meta.annotation, storage.type.annotation, entity.name.type.annotation.kotlin, punctuation.definition.annotation.kotlin, meta.annotation.java, meta.annotation.kotlin, meta.annotation.cs, meta.annotation.rust, meta.decorator.python, meta.decorator.js, meta.decorator.ts, punctuation.decorator.python, entity.name.function.decorator.python, entity.name.type.annotation.java, entity.name.type.attribute.rust | #616605 | — |
| string.quoted.raw.go | #6E747B | — |
| entity.other.attribute-name.go | #090909 | — |
| string.quoted.go | #086E14 | — |
| entity.name.function.mixin.css, meta.function.mixin.css entity.name.function.css | #5511BF | — |
| constant.numeric, constant.numeric.kotlin, constant.numeric.decimal, constant.numeric.integer, constant.numeric.float, constant.numeric.hex, constant.numeric.binary, constant.numeric.octal, constant.numeric.java, constant.numeric.js, constant.numeric.ts, constant.numeric.python, constant.numeric.go, constant.numeric.rust, constant.numeric.c, constant.numeric.cpp, constant.numeric.cs, constant.numeric.swift, constant.numeric.php, constant.numeric.ruby, constant.numeric.sql, constant.numeric.toml | #A31D8D | — |
| constant.numeric.css, meta.property-value.css constant.numeric.css, meta.property-list.css constant.numeric.css, source.css.embedded.html constant.numeric.css | #A31D8D | — |
| keyword.other.unit.css, keyword.other.unit.scss, keyword.other.unit.sass, keyword.other.unit.less, meta.property-value.css keyword.other.unit.css, meta.property-list.css keyword.other.unit.css, source.css.embedded.html keyword.other.unit.css | #A31D8D | — |
| variable.other.property.php | #A31D8D | — |
| variable.other.property.static.php | #A31D8D | italic |
| support.type.property-name.css, support.type.property-name.scss, support.type.property-name.sass, support.type.property-name.less, meta.property-name.css, meta.property-list.css meta.property-name.css, meta.property-list.css support.type.property-name.css, source.css.embedded.html meta.property-name.css, source.css.embedded.html support.type.property-name.css, support.type.custom-property.name.css, meta.property-name.css support.type.custom-property.name.css, meta.property-list.css support.type.custom-property.name.css, source.css.embedded.html support.type.custom-property.name.css, variable.other.custom-property.css, meta.property-name.css variable.other.custom-property.css | #14646E | — |
| support.constant.property-value.css, support.constant.property-value.scss, support.constant.property-value.sass, support.constant.property-value.less, meta.property-value.css support.constant.property-value.css, meta.property-list.css meta.property-value.css support.constant.property-value.css, source.css.embedded.html meta.property-value.css support.constant.property-value.css, constant.language.color.css | #090909 | — |
| punctuation, punctuation.kotlin, punctuation.definition.parameters, punctuation.definition.arguments, punctuation.definition.block, punctuation.section.block, punctuation.terminator.statement, punctuation.separator.delimiter | #090909 | — |
| punctuation.css, source.css punctuation.css, source.css.embedded.html punctuation.css, punctuation.section.property-list.begin.bracket.curly.css, punctuation.section.property-list.end.bracket.curly.css, punctuation.separator.key-value.css, punctuation.terminator.rule.css, punctuation.separator.list.comma.css, punctuation.definition.entity.css, punctuation.definition.keyword.css, punctuation.definition.string.begin.css, punctuation.definition.string.end.css | #090909 | — |
| keyword.operator, punctuation.separator, keyword.operator.kotlin, keyword.operator.assignment, keyword.operator.arithmetic, keyword.operator.comparison, keyword.operator.logical, keyword.operator.expression, keyword.operator.optional, keyword.operator.nullable, keyword.operator.spread, keyword.operator.sql, punctuation.separator.key-value | #090909 | — |
| keyword.operator.merge-key.yaml | #A31D8D | — |
| entity.name.type.yaml | #664229 | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.class.scss, entity.other.attribute-name.class.sass, entity.other.attribute-name.class.less, meta.selector.css entity.other.attribute-name.class.css, source.css.embedded.html entity.other.attribute-name.class.css | #5511BF | — |
| entity.name.tag.css, entity.other.attribute-name.css, entity.name.tag.scss, entity.name.tag.sass, entity.name.tag.less, source.css entity.name.tag.css, source.css.embedded.html entity.name.tag.css, meta.selector.css entity.name.tag.css, meta.selector.css entity.other.attribute-name.css | #5511BF | — |
| entity.other.attribute-name.id.css, entity.other.attribute-name.id.scss, entity.other.attribute-name.id.sass, entity.other.attribute-name.id.less, meta.selector.css entity.other.attribute-name.id.css, source.css.embedded.html entity.other.attribute-name.id.css, punctuation.definition.entity.css | #5511BF | — |
| 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, meta.selector.css entity.other.attribute-name.pseudo-class.css, meta.selector.css entity.other.attribute-name.pseudo-element.css, source.css.embedded.html entity.other.attribute-name.pseudo-class.css, source.css.embedded.html entity.other.attribute-name.pseudo-element.css | #5511BF | — |
| entity.name.tag.css, meta.selector.css entity.name.tag.css, source.css.embedded.html meta.selector.css entity.name.tag.css | #5511BF | — |
| string, string.quoted.double.kotlin, string.quoted.triple.kotlin, string.quoted.single, string.quoted.double, string.quoted.triple, string.quoted.raw, string.template, string.interpolated, string.quoted.single.java, string.quoted.double.java, string.quoted.single.js, string.quoted.double.js, string.template.js, string.quoted.single.ts, string.quoted.double.ts, string.template.ts, string.quoted.single.python, string.quoted.double.python, string.quoted.single.go, string.quoted.double.go, string.quoted.double.rust, string.quoted.single.c, string.quoted.double.c, string.quoted.single.cpp, string.quoted.double.cpp, string.quoted.single.cs, string.quoted.double.cs, string.quoted.double.swift, string.quoted.single.php, string.quoted.double.php, string.quoted.single.ruby, string.quoted.double.ruby, string.quoted.single.shell, string.quoted.double.shell, string.quoted.single.sql, string.quoted.double.sql, string.quoted.double.dockerfile, string.quoted.single.toml, string.quoted.double.toml, string.quoted.double.ini, string.unquoted.properties | #086E14 | — |
| constant.numeric.binary | #616605 | — |
| string.quoted.css, meta.property-value.css string.quoted.css, meta.property-list.css string.quoted.css, source.css.embedded.html string.quoted.css, string.quoted.double.css, string.quoted.single.css | #086E14 | — |
| constant.character.escape, constant.character.escape.kotlin, constant.character.escape.java, constant.character.escape.js, constant.character.escape.ts, constant.character.escape.python, constant.character.escape.go, constant.character.escape.rust, constant.character.escape.c, constant.character.escape.cpp, constant.character.escape.cs, constant.character.escape.swift, constant.character.escape.php, constant.character.escape.ruby, constant.character.escape.shell | #A31D8D | — |
| constant.character.escape.alternative | #5511BF | — |
| constant.character.escape.unicode | #A31D8D | — |
| constant.other.placeholder, meta.format-string | #664229 | — |
| string.regexp, constant.other.character-class.regexp, string.regexp.js, string.regexp.ts, string.regexp.python, string.regexp.ruby, string.regexp.php, string.regexp.go, keyword.operator.quantifier.regexp | #5511BF | — |
| punctuation.definition.tag.html, punctuation.definition.tag.xml, meta.tag.html, meta.tag.structure.html, meta.tag.metadata.html, meta.tag.inline.html, meta.tag.block.html, meta.tag.any.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html, punctuation.definition.tag.begin.xml, punctuation.definition.tag.end.xml | #00000046 | — |
| entity.name.tag.custom.html, support.class.component.html, support.class.component.jsx, support.class.component.tsx, entity.name.tag.component.vue, entity.name.tag.component.svelte, meta.tag.html entity.name.tag.custom.html, meta.tag.html support.class.component.html | #664229 | — |
| entity.name.tag.html, entity.name.tag.xml, entity.name.tag.jsx, entity.name.tag.tsx, entity.name.tag.vue, entity.name.tag.svelte, meta.tag.html entity.name.tag.html, meta.tag.structure.html entity.name.tag.html, meta.tag.metadata.html entity.name.tag.html, meta.tag.inline.html entity.name.tag.html, meta.tag.block.html entity.name.tag.html, meta.tag.any.html entity.name.tag.html | #1749BD | — |
| variable.parameter.url.css, string.other.url.css, meta.property-value.css variable.parameter.url.css, meta.property-value.css string.other.url.css, source.css.embedded.html variable.parameter.url.css, source.css.embedded.html string.other.url.css | #1749BD | — |
| string.unquoted.yaml, constant.language.yaml, string.unquoted.toml, constant.language.toml, string.unquoted.ini, string.unquoted.properties | #5511BF | — |
| invalid.deprecated | — | strikethrough |
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}!`;
}