Gasrulle Theme
A curated theme pack for VS Code — ported IDE themes (JetBrains Rider, Visual Studio, and more) plus original creations by Gasrulle.
A curated theme pack for VS Code — ported IDE themes (JetBrains Rider, Visual Studio, and more) plus original creations by Gasrulle.
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 |
|---|---|---|
| source, text | #C2C2C2 | — |
| comment, punctuation.definition.comment | #6E6E6E | italic |
| comment.block.documentation, comment.block.javadoc | #5A5A5A | italic |
| comment.block.documentation keyword, comment.block.documentation storage.type, entity.name.type.instance.jsdoc, keyword.other.documentation, storage.type.class.jsdoc | #888078 | — |
| keyword, keyword.control, keyword.operator.delete, keyword.operator.expression, keyword.operator.instanceof, keyword.operator.new, keyword.operator.typeof, keyword.operator.void, storage, storage.modifier, storage.type | #E68CA5 | — |
| keyword.control.conditional, keyword.control.flow, keyword.control.loop, keyword.control.trycatch | #F09CB5 | italic |
| keyword.operator, keyword.operator.arithmetic, keyword.operator.assignment, keyword.operator.bitwise, keyword.operator.comparison, keyword.operator.decrement, keyword.operator.increment, keyword.operator.relational, keyword.operator.ternary, punctuation.accessor, punctuation.separator, punctuation.terminator | #a0a0a0 | — |
| keyword.operator.logical, keyword.operator.logical.python | #66CACA | — |
| string, string.interpolated, string.quoted, string.template | #9AD68A | — |
| constant.character.escape, string.template punctuation.definition.template-expression | #D9B086 | — |
| constant.numeric, constant.numeric.binary, constant.numeric.float, constant.numeric.hex, constant.numeric.integer, constant.numeric.octal | #D9B086 | — |
| constant.language, constant.language.boolean, constant.language.null, constant.language.undefined, support.constant, variable.language.self, variable.language.super, variable.language.this | #D9B086 | italic |
| entity.name.function, meta.function-call entity.name.function, meta.method-call entity.name.function, support.function | #78C8F0 | — |
| entity.name.function.member, meta.function-call support.function | #78C8F0 | — |
| entity.name.type, entity.name.type.class, entity.name.type.enum, entity.name.type.interface, entity.name.type.struct, entity.other.inherited-class, support.class, support.type | #66CACA | — |
| entity.name.type.parameter, entity.name.type.type-parameter | #68C8C8 | — |
| meta.parameter, variable, variable.other, variable.parameter | #C2C2C2 | — |
| entity.name.tag.yaml, meta.object-literal.key, support.type.property-name, variable.other.object.property, variable.other.property | #E8A898 | — |
| variable.other.constant, variable.other.enummember | #D9B086 | italic |
| meta.attribute, meta.decorator, meta.decorator entity.name.function, meta.decorator punctuation.decorator, punctuation.definition.annotation, storage.type.annotation | #A8C98E | — |
| entity.name.module, entity.name.namespace, entity.name.type.module, entity.name.type.namespace | #989898 | — |
| meta.brace, punctuation.bracket, punctuation.definition.arguments, punctuation.definition.block, punctuation.definition.parameters, punctuation.section | #a0a0a0 | — |
| entity.name.tag, punctuation.definition.tag | #C07070 | — |
| entity.name.tag.custom, entity.name.tag.other.custom, support.class.component | #66CACA | — |
| entity.other.attribute-name | #A8C98E | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.class.mixin.css, entity.other.attribute-name.id.css | #D9B086 | — |
| support.type.property-name.css, support.type.vendored.property-name.css | #E8A898 | — |
| constant.other.color.rgb-value.hex.css, support.constant.color.w3c-standard-color-name.css, support.constant.font-name.css, support.constant.property-value.css | #D9B086 | — |
| entity.name.tag.css | #C07070 | — |
| keyword.other.unit.css | #D9B086 | — |
| variable.argument.css, variable.css | #E8A898 | — |
| support.type.property-name.json | #E8A898 | — |
| string.quoted.double.json, string.value.json | #9AD68A | — |
| markup.heading, markup.heading entity.name | #78C8F0 | bold |
| markup.bold | #D9B086 | bold |
| markup.italic | — | italic |
| markup.underline | — | underline |
| markup.fenced_code, markup.inline.raw, markup.raw | #9AD68A | — |
| markup.quote | #6E6E6E | italic |
| punctuation.definition.quote.begin.markdown | #9AD68A | — |
| punctuation.definition.list.begin.markdown | #78C8F0 | — |
| markup.underline.link | #78C8F0 | — |
| markup.inserted | #9AD68A | — |
| markup.deleted | #E07070 | — |
| markup.changed | #78C8F0 | — |
| constant.other.character-class.regexp, string.regexp, string.regexp.character-class | #C07070 | — |
| keyword.control.anchor.regexp, keyword.operator.or.regexp, keyword.operator.quantifier.regexp, punctuation.definition.group.regexp | #D9B086 | — |
| keyword.other.class.cs, keyword.other.namespace.cs, keyword.other.using.cs, keyword.other.var.cs | #E68CA5 | — |
| entity.name.variable.property.cs | #E8A898 | — |
| meta.preprocessor | #6E6E6E | — |
| meta.preprocessor.numeric | #D9B086 | — |
| meta.preprocessor.string | #9AD68A | — |
| meta.function-call.generic.python | #78C8F0 | — |
| support.function.builtin.python, support.function.magic.python | #66CACA | — |
| meta.function.decorator.identifier.python, meta.function.decorator.python | #A8C98E | — |
| variable.parameter.function.language.special.self.python | #D9B086 | italic |
| entity.name.type.alias.ts, entity.name.type.interface.ts | #B896D8 | — |
| variable.object.property.js, variable.object.property.jsx, variable.object.property.ts, variable.object.property.tsx | #E8A898 | — |
| entity.name.tag.yaml | #E8A898 | — |
| keyword.key.toml, support.type.property-name.table.toml | #E8A898 | — |
| variable.other.bracket.shell, variable.other.normal.shell, variable.other.positional.shell, variable.other.special.shell | #E8A898 | — |
| support.other.variable, support.variable | #C2C2C2 | — |
| entity.name.label | #a0a0a0 | — |
| invalid, invalid.illegal | #E07070 | — |
| invalid.deprecated | #E07070 | strikethrough |
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 |
|---|---|---|
| source, text | #B6BCCE | — |
| comment, punctuation.definition.comment | #60647A | italic |
| comment.block.documentation, comment.block.javadoc | #545866 | italic |
| comment.block.documentation keyword, comment.block.documentation storage.type, entity.name.type.instance.jsdoc, keyword.other.documentation, storage.type.class.jsdoc | #927A68 | — |
| keyword, keyword.control, keyword.operator.delete, keyword.operator.expression, keyword.operator.instanceof, keyword.operator.new, keyword.operator.typeof, keyword.operator.void, storage, storage.modifier, storage.type | #c9a0f5 | — |
| keyword.control.conditional, keyword.control.flow, keyword.control.loop, keyword.control.trycatch | #d8b0f8 | italic |
| keyword.operator, keyword.operator.arithmetic, keyword.operator.assignment, keyword.operator.bitwise, keyword.operator.comparison, keyword.operator.decrement, keyword.operator.increment, keyword.operator.relational, keyword.operator.ternary, punctuation.accessor, punctuation.separator, punctuation.terminator | #9aa2c0 | — |
| keyword.operator.logical, keyword.operator.logical.python | #81c8be | — |
| string, string.interpolated, string.quoted, string.template | #a6d189 | — |
| constant.character.escape, string.template punctuation.definition.template-expression | #f2b07a | — |
| constant.numeric, constant.numeric.binary, constant.numeric.float, constant.numeric.hex, constant.numeric.integer, constant.numeric.octal | #f2b07a | — |
| constant.language, constant.language.boolean, constant.language.null, constant.language.undefined, support.constant, variable.language.self, variable.language.super, variable.language.this | #f2b07a | italic |
| entity.name.function, meta.function-call entity.name.function, meta.method-call entity.name.function, support.function | #8caaee | — |
| entity.name.function.member, meta.function-call support.function | #8caaee | — |
| entity.name.type, entity.name.type.class, entity.name.type.enum, entity.name.type.interface, entity.name.type.struct, entity.other.inherited-class, support.class, support.type | #81c8be | — |
| entity.name.type.parameter, entity.name.type.type-parameter | #99d1db | — |
| meta.parameter, variable, variable.other, variable.parameter | #B6BCCE | — |
| entity.name.tag.yaml, meta.object-literal.key, support.type.property-name, variable.other.object.property, variable.other.property | #f4b8e4 | — |
| variable.other.constant, variable.other.enummember | #f2b07a | italic |
| meta.attribute, meta.decorator, meta.decorator entity.name.function, meta.decorator punctuation.decorator, punctuation.definition.annotation, storage.type.annotation | #e5c890 | — |
| entity.name.module, entity.name.namespace, entity.name.type.module, entity.name.type.namespace | #9399b2 | — |
| meta.brace, punctuation.bracket, punctuation.definition.arguments, punctuation.definition.block, punctuation.definition.parameters, punctuation.section | #9aa2c0 | — |
| entity.name.tag, punctuation.definition.tag | #f38ba8 | — |
| entity.name.tag.custom, entity.name.tag.other.custom, support.class.component | #81c8be | — |
| entity.other.attribute-name | #e5c890 | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.class.mixin.css, entity.other.attribute-name.id.css | #f9e2af | — |
| support.type.property-name.css, support.type.vendored.property-name.css | #f4b8e4 | — |
| constant.other.color.rgb-value.hex.css, support.constant.color.w3c-standard-color-name.css, support.constant.font-name.css, support.constant.property-value.css | #f2b07a | — |
| entity.name.tag.css | #f38ba8 | — |
| keyword.other.unit.css | #f2b07a | — |
| variable.argument.css, variable.css | #f4b8e4 | — |
| support.type.property-name.json | #f4b8e4 | — |
| string.quoted.double.json, string.value.json | #a6d189 | — |
| markup.heading, markup.heading entity.name | #8caaee | bold |
| markup.bold | #f2b07a | bold |
| markup.italic | — | italic |
| markup.underline | — | underline |
| markup.fenced_code, markup.inline.raw, markup.raw | #a6d189 | — |
| markup.quote | #60647A | italic |
| punctuation.definition.quote.begin.markdown | #a6d189 | — |
| punctuation.definition.list.begin.markdown | #8caaee | — |
| markup.underline.link | #8caaee | — |
| markup.inserted | #a6d189 | — |
| markup.deleted | #f38ba8 | — |
| markup.changed | #8caaee | — |
| constant.other.character-class.regexp, string.regexp, string.regexp.character-class | #f38ba8 | — |
| keyword.control.anchor.regexp, keyword.operator.or.regexp, keyword.operator.quantifier.regexp, punctuation.definition.group.regexp | #f2b07a | — |
| keyword.other.class.cs, keyword.other.namespace.cs, keyword.other.using.cs, keyword.other.var.cs | #c9a0f5 | — |
| entity.name.variable.property.cs | #f4b8e4 | — |
| meta.preprocessor | #60647A | — |
| meta.preprocessor.numeric | #f2b07a | — |
| meta.preprocessor.string | #a6d189 | — |
| meta.function-call.generic.python | #8caaee | — |
| support.function.builtin.python, support.function.magic.python | #81c8be | — |
| meta.function.decorator.identifier.python, meta.function.decorator.python | #e5c890 | — |
| variable.parameter.function.language.special.self.python | #f2b07a | italic |
| entity.name.type.alias.ts, entity.name.type.interface.ts | #b4befe | — |
| variable.object.property.js, variable.object.property.jsx, variable.object.property.ts, variable.object.property.tsx | #f4b8e4 | — |
| entity.name.tag.yaml | #f4b8e4 | — |
| keyword.key.toml, support.type.property-name.table.toml | #f4b8e4 | — |
| variable.other.bracket.shell, variable.other.normal.shell, variable.other.positional.shell, variable.other.special.shell | #f4b8e4 | — |
| support.other.variable, support.variable | #B6BCCE | — |
| entity.name.label | #9aa2c0 | — |
| invalid, invalid.illegal | #f38ba8 | — |
| invalid.deprecated | #f38ba8 | strikethrough |
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 |
|---|---|---|
| source, text | #B0B4C4 | — |
| comment, punctuation.definition.comment | #586390 | italic |
| comment.block.documentation, comment.block.javadoc | #4d577a | italic |
| comment.block.documentation keyword, comment.block.documentation storage.type, entity.name.type.instance.jsdoc, keyword.other.documentation, storage.type.class.jsdoc | #6E8098 | — |
| keyword, keyword.control, keyword.operator.delete, keyword.operator.expression, keyword.operator.instanceof, keyword.operator.new, keyword.operator.typeof, keyword.operator.void, storage, storage.modifier, storage.type | #7aa2f7 | — |
| keyword.control.conditional, keyword.control.flow, keyword.control.loop, keyword.control.trycatch | #89b4fa | italic |
| keyword.operator, keyword.operator.arithmetic, keyword.operator.assignment, keyword.operator.bitwise, keyword.operator.comparison, keyword.operator.decrement, keyword.operator.increment, keyword.operator.relational, keyword.operator.ternary, punctuation.accessor, punctuation.separator, punctuation.terminator | #808498 | — |
| keyword.operator.logical, keyword.operator.logical.python | #2ac3de | — |
| string, string.interpolated, string.quoted, string.template | #9ece6a | — |
| constant.character.escape, string.template punctuation.definition.template-expression | #E8B48A | — |
| constant.numeric, constant.numeric.binary, constant.numeric.float, constant.numeric.hex, constant.numeric.integer, constant.numeric.octal | #E8B48A | — |
| constant.language, constant.language.boolean, constant.language.null, constant.language.undefined, support.constant, variable.language.self, variable.language.super, variable.language.this | #E8B48A | italic |
| entity.name.function, meta.function-call entity.name.function, meta.method-call entity.name.function, support.function | #7dcfff | — |
| entity.name.function.member, meta.function-call support.function | #7dcfff | — |
| entity.name.type, entity.name.type.class, entity.name.type.enum, entity.name.type.interface, entity.name.type.struct, entity.other.inherited-class, support.class, support.type | #2ac3de | — |
| entity.name.type.parameter, entity.name.type.type-parameter | #b4f9f8 | — |
| meta.parameter, variable, variable.other, variable.parameter | #C4C8D6 | — |
| entity.name.tag.yaml, meta.object-literal.key, support.type.property-name, variable.other.object.property, variable.other.property | #73daca | — |
| variable.other.constant, variable.other.enummember | #E8B48A | italic |
| meta.attribute, meta.decorator, meta.decorator entity.name.function, meta.decorator punctuation.decorator, punctuation.definition.annotation, storage.type.annotation | #BAA478 | — |
| entity.name.module, entity.name.namespace, entity.name.type.module, entity.name.type.namespace | #767daa | — |
| meta.brace, punctuation.bracket, punctuation.definition.arguments, punctuation.definition.block, punctuation.definition.parameters, punctuation.section | #808498 | — |
| entity.name.tag, punctuation.definition.tag | #f7768e | — |
| entity.name.tag.custom, entity.name.tag.other.custom, support.class.component | #2ac3de | — |
| entity.other.attribute-name | #BAA478 | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.class.mixin.css, entity.other.attribute-name.id.css | #BAA478 | — |
| support.type.property-name.css, support.type.vendored.property-name.css | #73daca | — |
| constant.other.color.rgb-value.hex.css, support.constant.color.w3c-standard-color-name.css, support.constant.font-name.css, support.constant.property-value.css | #E8B48A | — |
| entity.name.tag.css | #f7768e | — |
| keyword.other.unit.css | #E8B48A | — |
| variable.argument.css, variable.css | #73daca | — |
| support.type.property-name.json | #73daca | — |
| string.quoted.double.json, string.value.json | #9ece6a | — |
| markup.heading, markup.heading entity.name | #7aa2f7 | bold |
| markup.bold | #E8B48A | bold |
| markup.italic | — | italic |
| markup.underline | — | underline |
| markup.fenced_code, markup.inline.raw, markup.raw | #9ece6a | — |
| markup.quote | #586390 | italic |
| punctuation.definition.quote.begin.markdown | #9ece6a | — |
| punctuation.definition.list.begin.markdown | #7aa2f7 | — |
| markup.underline.link | #7aa2f7 | — |
| markup.inserted | #9ece6a | — |
| markup.deleted | #f7768e | — |
| markup.changed | #7aa2f7 | — |
| constant.other.character-class.regexp, string.regexp, string.regexp.character-class | #f7768e | — |
| keyword.control.anchor.regexp, keyword.operator.or.regexp, keyword.operator.quantifier.regexp, punctuation.definition.group.regexp | #E8B48A | — |
| keyword.other.class.cs, keyword.other.namespace.cs, keyword.other.using.cs, keyword.other.var.cs | #7aa2f7 | — |
| entity.name.variable.property.cs | #73daca | — |
| meta.preprocessor | #586390 | — |
| meta.preprocessor.numeric | #E8B48A | — |
| meta.preprocessor.string | #9ece6a | — |
| meta.function-call.generic.python | #7dcfff | — |
| support.function.builtin.python, support.function.magic.python | #2ac3de | — |
| meta.function.decorator.identifier.python, meta.function.decorator.python | #BAA478 | — |
| variable.parameter.function.language.special.self.python | #E8B48A | italic |
| entity.name.type.alias.ts, entity.name.type.interface.ts | #bb9af7 | — |
| variable.object.property.js, variable.object.property.jsx, variable.object.property.ts, variable.object.property.tsx | #73daca | — |
| entity.name.tag.yaml | #73daca | — |
| keyword.key.toml, support.type.property-name.table.toml | #73daca | — |
| variable.other.bracket.shell, variable.other.normal.shell, variable.other.positional.shell, variable.other.special.shell | #73daca | — |
| support.other.variable, support.variable | #C4C8D6 | — |
| entity.name.label | #808498 | — |
| invalid, invalid.illegal | #f7768e | — |
| invalid.deprecated | #f7768e | strikethrough |
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 |
|---|---|---|
| source, text | #C2C2CA | — |
| comment, punctuation.definition.comment | #566698 | italic |
| comment.block.documentation, comment.block.javadoc | #4E5688 | italic |
| comment.block.documentation keyword, comment.block.documentation storage.type, entity.name.type.instance.jsdoc, keyword.other.documentation, storage.type.class.jsdoc | #8C7C94 | — |
| keyword, keyword.control, keyword.operator.delete, keyword.operator.expression, keyword.operator.instanceof, keyword.operator.new, keyword.operator.typeof, keyword.operator.void, storage, storage.modifier, storage.type | #ee8ac3 | — |
| keyword.control.conditional, keyword.control.flow, keyword.control.loop, keyword.control.trycatch | #f1a0ce | italic |
| keyword.operator, keyword.operator.arithmetic, keyword.operator.assignment, keyword.operator.bitwise, keyword.operator.comparison, keyword.operator.decrement, keyword.operator.increment, keyword.operator.relational, keyword.operator.ternary, punctuation.accessor, punctuation.separator, punctuation.terminator | #9090c0 | — |
| keyword.operator.logical, keyword.operator.logical.python | #98e1f0 | — |
| string, string.interpolated, string.quoted, string.template | #e9f096 | — |
| constant.character.escape, string.template punctuation.definition.template-expression | #edb77e | — |
| constant.numeric, constant.numeric.binary, constant.numeric.float, constant.numeric.hex, constant.numeric.integer, constant.numeric.octal | #be9bf1 | — |
| constant.language, constant.language.boolean, constant.language.null, constant.language.undefined, support.constant, variable.language.self, variable.language.super, variable.language.this | #be9bf1 | italic |
| entity.name.function, meta.function-call entity.name.function, meta.method-call entity.name.function, support.function | #61e984 | — |
| entity.name.function.member, meta.function-call support.function | #61e984 | — |
| entity.name.type, entity.name.type.class, entity.name.type.enum, entity.name.type.interface, entity.name.type.struct, entity.other.inherited-class, support.class, support.type | #98e1f0 | — |
| entity.name.type.parameter, entity.name.type.type-parameter | #a4ffff | — |
| meta.parameter, variable, variable.other, variable.parameter | #C2C2CA | — |
| entity.name.tag.yaml, meta.object-literal.key, support.type.property-name, variable.other.object.property, variable.other.property | #edb77e | — |
| variable.other.constant, variable.other.enummember | #be9bf1 | italic |
| meta.attribute, meta.decorator, meta.decorator entity.name.function, meta.decorator punctuation.decorator, punctuation.definition.annotation, storage.type.annotation | #efd090 | — |
| entity.name.module, entity.name.namespace, entity.name.type.module, entity.name.type.namespace | #7a7fb5 | — |
| meta.brace, punctuation.bracket, punctuation.definition.arguments, punctuation.definition.block, punctuation.definition.parameters, punctuation.section | #9090c0 | — |
| entity.name.tag, punctuation.definition.tag | #ff6e6e | — |
| entity.name.tag.custom, entity.name.tag.other.custom, support.class.component | #98e1f0 | — |
| entity.other.attribute-name | #efd090 | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.class.mixin.css, entity.other.attribute-name.id.css | #61e984 | — |
| support.type.property-name.css, support.type.vendored.property-name.css | #edb77e | — |
| constant.other.color.rgb-value.hex.css, support.constant.color.w3c-standard-color-name.css, support.constant.font-name.css, support.constant.property-value.css | #be9bf1 | — |
| entity.name.tag.css | #ff6e6e | — |
| keyword.other.unit.css | #be9bf1 | — |
| variable.argument.css, variable.css | #edb77e | — |
| support.type.property-name.json | #edb77e | — |
| string.quoted.double.json, string.value.json | #e9f096 | — |
| markup.heading, markup.heading entity.name | #be9bf1 | bold |
| markup.bold | #edb77e | bold |
| markup.italic | — | italic |
| markup.underline | — | underline |
| markup.fenced_code, markup.inline.raw, markup.raw | #e9f096 | — |
| markup.quote | #566698 | italic |
| punctuation.definition.quote.begin.markdown | #e9f096 | — |
| punctuation.definition.list.begin.markdown | #be9bf1 | — |
| markup.underline.link | #be9bf1 | — |
| markup.inserted | #61e984 | — |
| markup.deleted | #ff5555 | — |
| markup.changed | #be9bf1 | — |
| constant.other.character-class.regexp, string.regexp, string.regexp.character-class | #ff5555 | — |
| keyword.control.anchor.regexp, keyword.operator.or.regexp, keyword.operator.quantifier.regexp, punctuation.definition.group.regexp | #be9bf1 | — |
| keyword.other.class.cs, keyword.other.namespace.cs, keyword.other.using.cs, keyword.other.var.cs | #ee8ac3 | — |
| entity.name.variable.property.cs | #edb77e | — |
| meta.preprocessor | #566698 | — |
| meta.preprocessor.numeric | #be9bf1 | — |
| meta.preprocessor.string | #e9f096 | — |
| meta.function-call.generic.python | #61e984 | — |
| support.function.builtin.python, support.function.magic.python | #98e1f0 | — |
| meta.function.decorator.identifier.python, meta.function.decorator.python | #efd090 | — |
| variable.parameter.function.language.special.self.python | #be9bf1 | italic |
| entity.name.type.alias.ts, entity.name.type.interface.ts | #caa3f2 | — |
| variable.object.property.js, variable.object.property.jsx, variable.object.property.ts, variable.object.property.tsx | #edb77e | — |
| entity.name.tag.yaml | #edb77e | — |
| keyword.key.toml, support.type.property-name.table.toml | #edb77e | — |
| variable.other.bracket.shell, variable.other.normal.shell, variable.other.positional.shell, variable.other.special.shell | #edb77e | — |
| support.other.variable, support.variable | #C2C2CA | — |
| entity.name.label | #9090c0 | — |
| invalid, invalid.illegal | #ff5555 | — |
| invalid.deprecated | #ff5555 | 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}!`;
}
export interface User {
id: string;
name: string;
role: "admin" | "member";
tags: string[];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser(id: string): Promise<User | null> {
if (!id) {
return null;
}
const response = await fetch(`/api/users/${id}`, {
method: "GET",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return (await response.json()) as User;
}
function greet(user: User): string {
// Simple greeting function that uses the user's name
return `Hello, ${user.name}!`;
}
export interface User {
id: string;
name: string;
role: "admin" | "member";
tags: string[];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser(id: string): Promise<User | null> {
if (!id) {
return null;
}
const response = await fetch(`/api/users/${id}`, {
method: "GET",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return (await response.json()) as User;
}
function greet(user: User): string {
// Simple greeting function that uses the user's name
return `Hello, ${user.name}!`;
}
export interface User {
id: string;
name: string;
role: "admin" | "member";
tags: string[];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser(id: string): Promise<User | null> {
if (!id) {
return null;
}
const response = await fetch(`/api/users/${id}`, {
method: "GET",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return (await response.json()) as User;
}
function greet(user: User): string {
// Simple greeting function that uses the user's name
return `Hello, ${user.name}!`;
}