Moongate Theme
Publisher: yuelinghuashuThemes in package: 2
Where Moon Meets Code
Where Moon Meets Code
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.block.documentation entity.name.type, comment.block.documentation storage.type, constant.other.placeholder.go, constant.other.placeholder.rust, expression.embbeded.vue, meta.embedded, meta.function-call entity.name.function, meta.function-call.vue, meta.function.css variable, meta.method-call entity.name.function, meta.property-list.css variable, meta.property-name.css, punctuation.definition.expression.vue, punctuation.definition.placeholder.go, punctuation.definition.placeholder.rust, source.css variable, source.js.embedded, string.other.link.title.markdown, string.template meta.template.expression, support.constant.property-value.css, support.function.vue, support.type.property-name.css, variable.css | #7dd3fc | — |
| entity.name.package.go, meta.array.element, meta.chain entity.name.function, meta.function-call meta.function-call entity.name.function, meta.mapping.key.python, meta.method-call meta.method-call entity.name.function, meta.object-literal.key, meta.object.key, meta.object.key.js, meta.object.key.ts, string.unquoted.key.python, string.unquoted.label, text.html.basic, text.html.derivative, text.html.vue text, variable.other.destructuring | #cbd5e1 | — |
| entity.name.function, entity.name.function.macro.rust, entity.name.function.support.builtin.go, entity.name.function.support.go, meta.function-call, meta.function-call.generic.python, meta.function-call.python, meta.macro.invocation.rust entity.name.function, meta.macro.rust entity.name.function, support.function, support.function.builtin.python, support.function.python, support.macro.rust, variable.function | #87cefa | — |
| meta.function.closure.rust variable.other, source.css.embedded.html, source.js.embedded.html, variable.other.binding.rust, variable.other.constant, variable.other.global, variable.other.local, variable.other.mutable.rust, variable.other.readwrite, variable.other.readwrite.global, variable.other.readwrite.local, variable.other.rust | #e2e8f0 | — |
| entity.name.function.definition.rust, entity.name.function.go, entity.name.function.python, entity.name.function.rust, meta.function.call.rust entity.name.function, meta.function.closure.rust entity.name.function, meta.function.definition.rust entity.name.function, meta.function.go entity.name.function, meta.function.literal.go entity.name.function.go, meta.function.python entity.name.function, meta.function.rust entity.name.function | #87cefa | bold |
| comment.block.documentation keyword.other.documentation, entity.name.type.instance.jsdoc, entity.name.type.interface.go, keyword, storage.modifier, storage.type, storage.type.class.jsdoc, support.interface.go, support.self.rust, variable.language.self.rust | #3b82f6 | bold |
| markup.inserted, string, string.quoted.double, string.quoted.double.go meta.import.go, string.quoted.double.go meta.import.path.go, string.quoted.double.html, string.quoted.rune.go, string.quoted.single, string.quoted.single.html, text.html.vue string | #34d399 | — |
| entity.name.type.alias.go, entity.name.type.generic.rust, keyword.operator.channel.go, meta.generic.rust entity.name.type, meta.generic.rust support.type, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json, storage.type.array.go, storage.type.map.go, storage.type.slice.go, string.regexp | #22d3ee | — |
| meta.method-call meta.method-call meta.method-call entity.name.function, meta.object.key meta.object.key, meta.object.key.nested, meta.struct.field.go, punctuation.definition.block.tag.jsdoc, punctuation.definition.bracket.curly.jsdoc, variable.language.fenced.markdown, variable.other.member, variable.other.property, variable.other.property.go | #94a3b8 | — |
| comment.block.todo, comment.block.todo.rust, comment.line.double-slash.todo.rust, comment.line.todo, comment.todo, comment.xxx, constant.language.nil.go, constant.other.caps.rust, constant.other.rust | #fbbf24 | bold |
| entity.name.label.go, entity.name.tag, invalid, invalid.illegal, markup.deleted, meta.tag.sgml, meta.tag.vue, text.html.vue entity.name.tag | #f87171 | — |
| keyword.operator, meta.brace, punctuation, punctuation.accessor, punctuation.separator.dot, punctuation.separator.key-value, punctuation.separator.mapping.key-value | #475569 | — |
| constant.language, constant.numeric, entity.name.type, markup.changed, support.class, support.constant, support.type | #fbbf24 | — |
| entity.name.attribute.rust, entity.name.function.decorator.python, fenced_code.block.language.markdown, meta.attribute.rust, meta.decorator.python, punctuation.definition.attribute.rust, support.function.vue.lifecycle | #c084fc | italic |
| entity.other.attribute-name, markup.raw.block, source.json meta.structure.dictionary.json support.type.property-name.json, text.html.vue entity.other.attribute-name | #3b82f6 | — |
| comment.hack, entity.other.attribute-name.html.vue, meta.directive.vue, punctuation.definition.directive.vue | #c084fc | bold |
| *link*, *uri*, *url* | — | underline |
| markup.italic, variable.other.parameter, variable.parameter | #cbd5e1 | italic |
| meta.object.key constant, meta.object.key constant.other, variable.other.global.go | #e2e8f0 | bold |
| comment.note, entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css | #7dd3fc | italic |
| meta.function.rust variable.parameter, variable.parameter.receiver.go, variable.parameter.rust | #cbd5e1 | italic |
| comment, punctuation.definition.comment | #a5b4cb | italic |
| entity.name.tag.doctype.html, meta.tag.sgml.html | #2d3748 | — |
| entity.name.type.instance.jsdoc variable, variable.other.jsdoc | #34d399 | italic |
| markdown.heading, markup.heading | #34d399 | bold |
| entity.name.lifetime.rust, punctuation.definition.lifetime.rust | #22d3ee | italic |
| storage.type.pointer.go | #22d3ee | underline |
| variable.other.err.go | #f87171 | italic |
| constant.other.blank.go | #94a3b8 | italic |
| 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 | #c084fc | — |
| markup.bold | #e2e8f0 | bold |
| comment.fixme | #f87171 | bold italic |
| comment.bug | #f87171 | bold underline |
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}!`;
}