Nature For EYE Theme
Publisher: unreal0Themes in package: 3
A UI and syntax theme for VSCode based on the nature colors.
A UI and syntax theme for VSCode based on the nature colors.
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 |
|---|---|---|
| punctuation.definition.string.begin,punctuation.definition.string.end | #98c378 | — |
| variable.parameter.function | #A6B2C0 | — |
| comment, punctuation.definition.comment | #1d292b | italic |
| comment | #1d292b | italic |
| comment markup.link | #5C6370 | — |
| markup.changed.diff | #e0c286 | — |
| meta.diff.header.from-file,punctuation.definition.from-file.diff | #33a0ff | — |
| markup.inserted.diff | #43d08a | — |
| markup.deleted.diff | #e05252 | — |
| meta.function.c | #e06c75 | — |
| keyword.control.cpp | #004734 | — |
| 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 | #abb2bf | — |
| punctuation.separator.key-value | #bbbbbb | — |
| entity.other.attribute-name.js,entity.other.attribute-name.ts,entity.other.attribute-name.jsx,entity.other.attribute-name.tsx,variable.parameter,variable.language.super | — | italic |
| keyword.operator.expression.import | #61afef | — |
| support.constant.math | #004734 | — |
| support.constant.property.math | #d19a66 | — |
| variable.other.constant | #d19a66 | — |
| punctuation.definition.template-expression.begin,punctuation.definition.template-expression.end | #e06c75 | — |
| support.module.node,support.type.object.module,support.module.node | #004734 | — |
| variable.other.readwrite,support.variable.property,support.variable.object.process,support.variable.object.node | #00796b | — |
| meta.object-literal.key | #e6e6e6 | — |
| support.constant.json | #d19a66 | — |
| keyword.operator.expression.instanceof,keyword.operator.new,keyword.operator.ternary | #ab47bc | — |
| support.type.object.console | #e06c75 | — |
| support.variable.property.process | #d19a66 | — |
| entity.name.function,support.function.console | #61afef | — |
| keyword.operator | #56b6c2 | — |
| support.type.object.dom | #56b6c2 | — |
| support.variable.dom,support.variable.property.dom | #e06c75 | — |
| storage.type.annotation.java | #004734 | — |
| source.java | #e06c75 | — |
| 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,storage.type.generic.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,meta.method.body.java | #abb2bf | — |
| meta.method.java | #61afef | — |
| storage.modifier.import.java,storage.type.java | #004734 | — |
| meta.definition.variable.name.java | #e06c75 | — |
| token.variable.parameter.java | #abb2bf | — |
| import.storage.java | #004734 | — |
| keyword.operator.logical.js | #ffffff | — |
| keyword.operator.bitwise | #ffffff | — |
| support.constant.property-value.scss,support.constant.property-value.css | #d19a66 | — |
| support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss | #d19a66 | — |
| punctuation.separator.list.comma.css | #b9c0ca | — |
| support.constant.color.w3c-standard-color-name.css | #d19a66 | — |
| support.type.vendored.property-name.css | #56b6c2 | — |
| comment.line.double-slash,comment.block.documentation | — | bold italic |
| keyword.operator.arithmetic,keyword.operator.comparison | #ffffff | — |
| keyword.operator.assignment.c,keyword.operator.comparison.c,keyword.operator.c,keyword.operator.increment.c | #ab47bcff | — |
| punctuation.separator.delimiter.c | #bbbbbb | — |
| support.type.posix-reserved.c | #57adb8 | — |
| keyword.operator.sizeof.c | #C178DD | — |
| meta.function.decorator.python | #f2f28d | — |
| support.token.decorator.python,meta.function.decorator.identifier.python | #56B6C2 | — |
| variable.parameter.function.language.python | #d19a66 | — |
| support.type.python | #56b6c2 | — |
| keyword.operator.logical.python | #ab47bc | — |
| meta.function-call.arguments.python | #E06C60 | — |
| meta.function-call.python | #E06C60 | — |
| variable.parameter.function.python | #D18C4E | — |
| punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python,meta.function-call.arguments.python | #abb2bf | — |
| meta.function-call.generic.python | #61afef | — |
| punctuation.definition.comment | #1e2526 | — |
| none | #8c8c8c | — |
| keyword.operator | #f28c8c | — |
| keyword | #f2f28c | — |
| variable | #7986cb | — |
| token.package.keyword | #8cf2f2 | — |
| token.package | #E6E6E6 | — |
| entity.name.function, meta.require, support.function.any-method | #ff9100 | — |
| entity.name.type.namespace | #f28ce1 | — |
| support.class, entity.name.type.class | #f28ce1 | — |
| entity.name.class.identifier.namespace.type | #f28ce1 | — |
| entity.name.class | #f28ce1 | — |
| entity.name.type | #f28c8c | — |
| keyword.control | #f2f28c | — |
| control.elements, keyword.operator.less | #f2f28c | — |
| keyword.other.special-method | #ff9100 | — |
| storage | #ab47bc | — |
| token.storage | #8e24aa | — |
| 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 | #ab47bc | — |
| token.storage.type.java | #004734 | — |
| support.function | #56b6c2 | — |
| support.type.property-name | #abb2bf | — |
| support.constant.property-value | #abb2bf | — |
| support.constant.font-name | #d19a66 | — |
| meta.tag | #abb2bf | — |
| string, entity.other.inherited-class | #9e9e9e | — |
| constant.other.symbol | #56b6c2 | — |
| constant.numeric | #8cf2f2 | — |
| none | #8cf2f2 | — |
| none | #8cf2f2 | — |
| constant | #8cf2f2 | — |
| punctuation.definition.constant | #8cf2f2 | — |
| entity.name.tag | #7986cb | — |
| entity.other.attribute-name | #ab47bc | — |
| entity.other.attribute-name.id | #ff9100 | normal |
| entity.other.attribute-name.class.css | #d08cf2 | normal |
| meta.selector | #f2f28d | — |
| none | #9e9e9e | — |
| markup.heading | #d08cf2 | bold |
| markup.heading punctuation.definition.heading, entity.name.section | #8df2f2 | — |
| keyword.other.unit | #f2bf8d | — |
| markup.bold,todo.bold | #f2bf8d | bold |
| punctuation.definition.bold | #f2f28d | — |
| markup.italic, punctuation.definition.italic,todo.emphasis | #d08df2 | — |
| emphasis md | #d08df2 | — |
| entity.name.section.markdown | #f2f28d | — |
| punctuation.definition.heading.markdown | #f2f28d | — |
| markup.heading.setext | #f2bf8d | — |
| punctuation.definition.bold.markdown | #424242 | — |
| markup.inline.raw.markdown | #8df2f2 | — |
| beginning.punctuation.definition.list.markdown | #00796b | — |
| markup.quote.markdown | #7986cb | italic |
| punctuation.definition.string.begin.markdown,punctuation.definition.string.end.markdown,punctuation.definition.metadata.markdown | #f2f28d | — |
| punctuation.definition.metadata.markdown | #424242 | — |
| markup.underline.link.markdown,markup.underline.link.image.markdown | #424242 | — |
| string.other.link.title.markdown,string.other.link.description.markdown | ##9e9e9e | — |
| markup.italic.markdown | — | italic |
| markup.bold.markdown | — | bold |
| string.regexp | #e0c286 | — |
| constant.character.escape | #f2bf8d | — |
| punctuation.section.embedded, variable.interpolation | #00796b | — |
| invalid.illegal | #FFFFFF | — |
| invalid.broken | #FFFFFF | — |
| invalid.deprecated | #FFFFFF | — |
| invalid.unimplemented | #FFFFFF | — |
| source.json meta.structure.dictionary.json > string.quoted.json | #7986cb | — |
| source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string | #7986cb | — |
| 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 | #8df28d | — |
| source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json | #f2bf8d | — |
| support.type.property-name.json | #7986cb | — |
| support.type.property-name.json punctuation | #8df2f2 | — |
| text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade | #d08df2 | — |
| text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade | #d08df2 | — |
| support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php | #f2f28d | — |
| keyword.operator.error-control.php | #d08df2 | — |
| keyword.operator.type.php | #d08df2 | — |
| punctuation.section.array.begin.php | #7986cb | — |
| punctuation.section.array.end.php | #7986cb | — |
| invalid.illegal.non-null-typehinted.php | #e05252 | — |
| storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php | #e0c286 | — |
| meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php | #00796b | — |
| 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 | #e6e6e6 | — |
| support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php | #7986cb | — |
| entity.name.goto-label.php,support.other.php | #00796b | — |
| keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php | #f2f28d | — |
| keyword.operator.regexp.php | #00796b | — |
| keyword.operator.comparison.php | #8df2f2 | — |
| punctuation.definition.variable.php | #d08df2 | — |
| keyword.operator.heredoc.php,keyword.operator.nowdoc.php | #d08df2 | — |
| function.parameter | #f28ee1 | — |
| function.parameter | #abb2f28ee1bf | — |
| function.brace | #e6e6e6 | — |
| function.parameter.ruby, function.parameter.cs | #f28ee1 | — |
| rgb-value | #7986cb | — |
| inline-color-decoration rgb-value | #8df2f2 | — |
| less rgb-value | #7986cb | — |
| selector.sass | #8df2f2 | — |
| var.this,variable.language.this.js,variable.language.this.ts,variable.language.this.jsx,variable.language.this.tsx | #f28ee1 | italic |
| support.type.primitive.ts,support.type.builtin.ts | #00796b | — |
| block.scope.end,block.scope.begin | #e6e6e6 | — |
| entity.name.variable.local.cs | #d08df2 | — |
| token.info-token | #33a0ff | — |
| token.warn-token | #e0c286 | — |
| token.error-token | #e05252 | — |
| token.debug-token | #43d08a | — |
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 |
|---|---|---|
| comment, punctuation.definition.comment | #1d292b | italic |
| constant | #ff628c | — |
| entity | #82d8d8 | — |
| invalid | #800f00 | — |
| keyword, storage.type.class.js | #E54B4B | — |
| meta | #9effff | — |
| meta.brace | #9588aa | — |
| punctuation | #9588aa | — |
| punctuation.definition.parameters | #CBE56C | — |
| punctuation.definition.template-expression | #CBE56C | — |
| storage | #82d8d8 | — |
| storage.type.function.arrow | #82d8d8 | — |
| string, punctuation.definition.string | #CBE56C | — |
| string.template, punctuation.definition.string.template | #CBE56C | — |
| support | #CF256D | — |
| support.function | #ff9d00 | — |
| support.variable.property.dom | #b8b0c6 | — |
| variable | #b8b0c6 | — |
| source.css entity, source.stylus entity | #b8b0c6 | — |
| entity.other.attribute-name.id.css | #82d8d8 | — |
| entity.name.tag | #CF256D | — |
| source.css support, source.stylus support | #CBE56C | — |
| source.css constant, source.css support.constant, source.stylus constant, source.stylus support.constant | #82d8d8 | — |
| source.css string, source.css punctuation.definition.string, source.stylus string, source.stylus punctuation.definition.string | #82d8d8 | — |
| source.css variable, source.stylus variable | #9588aa | — |
| text.html.basic entity.name | #9588aa | — |
| meta.toc-list.id.html | #CBE56C | — |
| text.html.basic entity.other | #b8b0c6 | italic |
| meta.tag.metadata.script.html entity.name.tag.html | #b8b0c6 | — |
| punctuation.definition.string.begin, punctuation.definition.string.end | #92fc79 | — |
| source.ini entity | #e1efff | — |
| source.ini keyword | #524763 | — |
| source.ini punctuation.definition | #ffee80 | — |
| source.ini punctuation.separator | #ff9d00 | — |
| source.js storage.type.function | #CF256D | — |
| variable.language, entity.name.type.class.js | #CF256D | — |
| entity.other.inherited-class.js | #ccc | — |
| variable.parameter.function.language.special.self.python | #CF256D | — |
| source.json support | #b8b0c6 | — |
| source.json string, source.json punctuation.definition.string | #e1efff | — |
| punctuation.definition.heading.markdown | #e1efff | — |
| entity.name.section.markdown, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown | #E54B4B | bold |
| meta.paragraph.markdown | #e1efff | — |
| beginning.punctuation.definition.quote.markdown | #524763 | — |
| markup.quote.markdown meta.paragraph.markdown | #9effff | italic |
| meta.separator.markdown | #524763 | — |
| markup.bold.markdown | #9effff | bold |
| markup.italic.markdown | #9effff | italic |
| beginning.punctuation.definition.list.markdown | #524763 | — |
| string.other.link.title.markdown | #CBE56C | — |
| string.other.link.title.markdown, string.other.link.description.markdown, string.other.link.description.title.markdown | #CBE56C | — |
| markup.underline.link.markdown, markup.underline.link.image.markdown | #9effff | — |
| fenced_code.block.language, markup.inline.raw.markdown | #9effff | — |
| fenced_code.block.language, markup.inline.raw.markdown | #9effff | — |
| text.jade entity.name | #9effff | — |
| text.jade entity.other.attribute-name.tag | — | italic |
| text.jade string.interpolated | #ffee80 | — |
| source.ts entity.name.type | #80ffbb | — |
| source.ts keyword | #524763 | — |
| source.ts punctuation.definition.parameters | #e1efff | — |
| meta.arrow.ts punctuation.definition.parameters | #ffee80 | — |
| source.ts storage | #9effff | — |
| source.php entity | #9effff | — |
| variable.other.php | #524763 | — |
| modifier, this, comment, storage.modifier.js, entity.other.attribute-name.js | — | italic |
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 |
|---|---|---|
| — | #eeffff | — |
| comment, punctuation.definition.comment | #546E7A | italic |
| variable, string constant.other.placeholder | #EEFFFF | — |
| constant.other.color | #ffffff | — |
| invalid, invalid.illegal | #FF5370 | — |
| keyword, storage.type, storage.modifier | #25a2a6 | — |
| keyword.control, constant.other.color, punctuation, meta.tag, punctuation.definition.tag, punctuation.separator.inheritance.php, punctuation.definition.tag.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html, punctuation.section.embedded, keyword.other.template, keyword.other.substitution | #708394 | — |
| entity.name.tag, meta.tag.sgml, markup.deleted.git_gutter | #64B1CE | — |
| entity.name.function, meta.function-call, variable.function, support.function, keyword.other.special-method | #28735E | — |
| meta.block variable.other | #5cb4de | — |
| support.other.variable, string.other.link | #d8c569 | — |
| constant.numeric, constant.language, support.constant, constant.character, constant.escape, variable.parameter, keyword.other.unit, keyword.other | #708394 | — |
| string, constant.other.symbol, constant.other.key, entity.other.inherited-class, markup.heading, markup.inserted.git_gutter, meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js | #708394 | normal |
| entity.name, support.type, support.class, support.orther.namespace.use.php, meta.use.php, support.other.namespace.php, markup.changed.git_gutter, support.type.sys-types | #28735E | — |
| support.type | #708394 | — |
| source.css support.type.property-name, source.sass support.type.property-name, source.scss support.type.property-name, source.less support.type.property-name, source.stylus support.type.property-name, source.postcss support.type.property-name | #B2CCD6 | — |
| entity.name.module.js, variable.import.parameter.js, variable.other.class.js | #FF5370 | — |
| variable.language | #FF5370 | italic |
| entity.name.method.js | #28735E | italic |
| meta.class-method.js entity.name.function.js, variable.function.constructor | #28735E | — |
| entity.other.attribute-name | #25a2a6 | — |
| text.html.basic entity.other.attribute-name.html, text.html.basic entity.other.attribute-name | #28735E | italic |
| entity.other.attribute-name.class | #28735E | — |
| source.sass keyword.control | #28735E | — |
| markup.inserted | #C3E88D | — |
| markup.deleted | #FF5370 | — |
| markup.changed | #25a2a6 | — |
| string.regexp | #708394 | — |
| constant.character.escape | #708394 | — |
| *url*, *link*, *uri* | — | underline |
| tag.decorator.js entity.name.tag.js, tag.decorator.js punctuation.definition.tag.js | #28735E | italic |
| source.js constant.other.object.key.js string.unquoted.label.js | #FF5370 | italic |
| source.json meta.structure.dictionary.json support.type.property-name.json | #25a2a6 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #25a2a6 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #F78C6C | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #FF5370 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #C17E70 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #28735E | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #d8c569 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #25a2a6 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #C3E88D | — |
| text.html.markdown, punctuation.definition.list_item.markdown | #fafafa | — |
| text.html.markdown markup.inline.raw.markdown | #25a2a6 | — |
| text.html.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown | #65737E | — |
| text.html.markdown meta.dummy.line-break | — | |
| markdown.heading, markup.heading | markup.heading entity.name, markup.heading.markdown punctuation.definition.heading.markdown | #004d40 | — |
| markup.italic | #d8c569 | italic |
| markup.bold, markup.bold string | #d8c569 | bold |
| markup.bold markup.italic, markup.italic markup.bold, markup.quote markup.bold, markup.bold markup.italic string, markup.italic markup.bold string, markup.quote markup.bold string | #d8c569 | bold |
| markup.underline | #424242 | underline |
| markup.strike | strike | |
| markup.quote punctuation.definition.blockquote.markdown | #65737E | — |
| markup.quote | italic | |
| string.other.link.title.markdown | #757575 | — |
| string.other.link.description.title.markdown | #25a2a6 | — |
| constant.other.reference.link.markdown | #FFCB6B | — |
| markup.raw.block | #25a2a6 | — |
| markup.raw.block.fenced.markdown | #00000050 | — |
| punctuation.definition.fenced.markdown | #00000050 | — |
| markup.raw.block.fenced.markdown, variable.language.fenced.markdown, punctuation.section.class.end | #EEFFFF | — |
| variable.language.fenced.markdown | #65737E | — |
| meta.separator | #65737E | bold |
| markup.table | #EEFFFF | — |
| token.info-token | #6796e6 | — |
| token.warn-token | #cd9731 | — |
| token.error-token | #f44747 | — |
| token.debug-token | #b267e6 | — |
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}!`;
}