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, punctuation.definition.comment | #a5b4cb | italic |
| keyword, storage.type, storage.modifier | #3b82f6 | bold |
| keyword.operator, punctuation, meta.brace | #475569 | — |
| entity.name.function, meta.function-call, variable.function, support.function | #87cefa | — |
| constant.numeric, constant.language, support.constant | #fbbf24 | — |
| string, string.quoted.single, string.quoted.double, text.html.vue string | #34d399 | — |
| meta.embedded, source.js.embedded, string.template meta.template.expression | #7dd3fc | — |
| entity.name.type, support.type, support.class | #fbbf24 | — |
| entity.name.tag, meta.tag.sgml, text.html.vue entity.name.tag, meta.tag.vue | #f87171 | — |
| entity.other.attribute-name, text.html.vue entity.other.attribute-name | #3b82f6 | — |
| string.regexp | #22d3ee | — |
| *url*, *link*, *uri* | — | underline |
| invalid, invalid.illegal | #f87171 | — |
| markup.inserted | #34d399 | — |
| markup.deleted | #f87171 | — |
| markup.changed | #fbbf24 | — |
| comment.line.todo, comment.block.todo | #fbbf24 | bold |
| variable.other.readwrite.local, variable.other.local, variable.other.readwrite | #e2e8f0 | — |
| variable.parameter, variable.other.parameter | #cbd5e1 | italic |
| variable.other.constant, variable.other.global, variable.other.readwrite.global | #e2e8f0 | bold |
| variable.other.property, variable.other.member | #94a3b8 | — |
| variable.other.destructuring | #cbd5e1 | — |
| meta.object.key, meta.object-literal.key, string.unquoted.label, meta.object.key.js, meta.object.key.ts | #cbd5e1 | — |
| meta.object.key constant, meta.object.key constant.other | #e2e8f0 | bold |
| meta.object.key meta.object.key, meta.object.key.nested | #94a3b8 | — |
| punctuation.separator.key-value, punctuation.separator.mapping.key-value | #475569 | — |
| meta.method-call entity.name.function, meta.function-call entity.name.function | #7dd3fc | — |
| meta.method-call meta.method-call entity.name.function, meta.function-call meta.function-call entity.name.function, meta.chain entity.name.function | #cbd5e1 | — |
| meta.method-call meta.method-call meta.method-call entity.name.function | #94a3b8 | — |
| punctuation.accessor, punctuation.separator.dot | #475569 | — |
| meta.array.element | #cbd5e1 | — |
| support.type.property-name.css, meta.property-name.css | #7dd3fc | — |
| keyword.other.unit.css, keyword.other.unit.rem.css, keyword.other.unit.px.css, keyword.other.unit.em.css, keyword.other.unit.percent.css | #fbbf24 | — |
| meta.property-list.css variable, source.css variable, variable.css | #7dd3fc | — |
| meta.function.css variable, support.constant.property-value.css | #7dd3fc | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.id.css, entity.name.tag.css | #3b82f6 | — |
| entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css | #7dd3fc | italic |
| keyword.control.at-rule.css, meta.at-rule.css keyword | #3b82f6 | bold |
| constant.numeric.css | #fbbf24 | — |
| meta.tag.sgml.html, entity.name.tag.doctype.html | #2d3748 | — |
| string.quoted.double.html, string.quoted.single.html | #34d399 | — |
| text.html.basic, text.html.vue text, text.html.derivative | #cbd5e1 | — |
| comment.block.html, comment.html | #94a3b8 | italic |
| source.js.embedded.html | #e2e8f0 | — |
| source.css.embedded.html | #e2e8f0 | — |
| comment.block.documentation keyword.other.documentation, storage.type.class.jsdoc, entity.name.type.instance.jsdoc | #3b82f6 | bold |
| variable.other.jsdoc, entity.name.type.instance.jsdoc variable | #34d399 | italic |
| comment.block.documentation storage.type, comment.block.documentation entity.name.type | #7dd3fc | — |
| punctuation.definition.block.tag.jsdoc, punctuation.definition.bracket.curly.jsdoc | #94a3b8 | — |
| source.json meta.structure.dictionary.json support.type.property-name.json | #3b82f6 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #22d3ee | — |
| 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 | — |
| markdown.heading, markup.heading | #34d399 | bold |
| string.other.link.title.markdown | #7dd3fc | — |
| markup.italic | #cbd5e1 | italic |
| markup.bold | #e2e8f0 | bold |
| markup.raw.block | #3b82f6 | — |
| variable.language.fenced.markdown | #94a3b8 | — |
| fenced_code.block.language.markdown | #c084fc | italic |
| variable.other.readwrite.python, variable.other.python | #cbd5e1 | — |
| variable.parameter.python | #cbd5e1 | italic |
| constant.other.python, variable.other.constant.python | #e2e8f0 | bold |
| variable.other.property.python | #cbd5e1 | — |
| meta.mapping.key.python, string.unquoted.key.python | #cbd5e1 | — |
| entity.name.function.decorator.python, meta.decorator.python | #c084fc | italic |
| source.python variable.other | #cbd5e1 | — |
| entity.other.attribute-name.html.vue, meta.directive.vue, punctuation.definition.directive.vue | #c084fc | bold |
| expression.embbeded.vue, punctuation.definition.expression.vue | #7dd3fc | — |
| support.function.vue, meta.function-call.vue | #7dd3fc | — |
| support.function.vue.lifecycle | #c084fc | italic |
| comment.todo | #fbbf24 | bold |
| comment.fixme | #f87171 | bold italic |
| comment.note | #7dd3fc | italic |
| comment.hack | #c084fc | bold |
| comment.bug | #f87171 | bold underline |
| comment.xxx | #fbbf24 | bold |
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}!`;
}