水墨 Theme
Publisher: wangxThemes in package: 2
点墨成渊映竹影,化筠为简蕴幽香。指尖经纬裁风雨,且护明眸夜未央。
点墨成渊映竹影,化筠为简蕴幽香。指尖经纬裁风雨,且护明眸夜未央。
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, string.comment | #4A5E42 | italic |
| keyword, keyword.operator.new, keyword.operator.expression, keyword.operator.delete, keyword.operator.typeof, keyword.operator.instanceof, keyword.operator.void | #001B42 | — |
| keyword.control, keyword.control.flow, keyword.control.conditional, keyword.control.loop, keyword.control.import, keyword.control.export, keyword.control.from, keyword.control.return, keyword.control.trycatch, keyword.control.exception | #001B42 | italic |
| storage.type, storage.type.function, storage.type.class, storage.type.enum, storage.type.interface, storage.type.ts | #001B42 | — |
| storage.modifier, storage.type.annotation | #052616 | italic |
| entity.name.type, entity.name.class, support.type, support.class | #2E0033 | — |
| entity.other.inherited-class | #2E0033 | italic |
| entity.name.function, support.function, meta.function-call.generic, meta.function-call.object | #052616 | — |
| variable, variable.other, variable.other.readwrite, meta.definition.variable, support.variable | #0A0A0A | — |
| variable.parameter, meta.function.parameters | #361B00 | italic |
| variable.other.constant, variable.other.enummember, support.constant | #361B00 | — |
| variable.language.this, variable.language.super, variable.language.special, variable.parameter.function.language.special | #2E0033 | italic |
| string, punctuation.definition.string, string punctuation.section.embedded source | #47000B | — |
| constant.numeric, constant.language, constant.character, constant.escape | #361B00 | — |
| keyword.operator, keyword.operator.assignment, keyword.operator.arithmetic, keyword.operator.comparison, keyword.operator.relational, keyword.operator.ternary, keyword.operator.type, keyword.operator.spread | #001B42 | — |
| punctuation, punctuation.separator, punctuation.terminator, punctuation.definition.parameters, punctuation.definition.array, punctuation.definition.dictionary, punctuation.definition.block, punctuation.definition.tag, meta.brace.round, meta.brace.square | #0A0A0A | — |
| entity.name.tag | #001B42 | |
| meta.tag.other.unrecognized entity.name.tag | #4A2000 | — |
| entity.other.attribute-name | #052616 | italic |
| markup.heading, markup.heading entity.name | #000000 | bold |
| markup.italic | — | italic |
| markup.bold | — | bold |
| markup.underline | — | underline |
| markup.strikethrough | — | strikethrough |
| markup.quote | #102610 | italic |
| markup.inline.raw, markup.fenced_code.block | #47000B | — |
| markup.deleted, meta.diff.header.from-file, punctuation.definition.deleted | #6B0000 | — |
| markup.inserted, meta.diff.header.to-file, punctuation.definition.inserted | #052616 | — |
| markup.changed, punctuation.definition.changed | #664800 | — |
| source.json meta.structure.dictionary.json support.type.property-name.json | #2E0033 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #052616 | — |
| 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 | #47000B | — |
| 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 | #001B42 | — |
| 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 | #6B0000 | — |
| 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 | #664800 | — |
| storage.modifier.import.java, variable.language.wildcard.java, storage.modifier.package.java | #001B42 | — |
| meta.method.java entity.name.function.java | #052616 | — |
| meta.class.java entity.name.type.class.java, meta.interface.java entity.name.type.interface.java | #2E0033 | — |
| meta.annotation.java, meta.annotation.java entity.name.type.class.java, meta.annotation.java punctuation.definition.annotation.java | #2E0033 | italic |
| support.type.python, support.class.python | #2E0033 | — |
| meta.function.python entity.name.function.python, meta.function-call.python | #052616 | — |
| meta.function-call.arguments.python | #0A0A0A | — |
| meta.member.access.python | #0A0A0A | — |
| support.type.exception.python | #6B0000 | — |
| meta.decorator.python, meta.decorator.python entity.name.function.python | #2E0033 | italic |
| variable.parameter.function.language.special.self.python | #2E0033 | italic |
| string.regexp | #2E0033 | — |
| string.template, punctuation.definition.template-expression | #001B42 | — |
| entity.name.type.module, support.module, support.node | #2E0033 | — |
| keyword.control.as, keyword.control.default | #001B42 | italic |
| support.type.builtin, support.type.primitive | #2E0033 | — |
| meta.type.annotation, meta.type.parameters | #2E0033 | — |
| markup.list | #001B42 | — |
| markup.list.unnumbered.markdown, markup.list.numbered.markdown | #0A0A0A | — |
| punctuation.definition.tag | #0A0A0A | — |
| entity.other.attribute-name.id | #052616 | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.class.mixin.css | #052616 | — |
| support.type.property-name.css, support.type.vendored.property-name.css | #052616 | — |
| support.constant.property-value.css, support.constant.font-name, meta.property-value.css | #0A0A0A | — |
| constant.numeric.css, keyword.other.unit.css | #361B00 | — |
| keyword.other.important.css | #6B0000 | bold |
| entity.name.tag.css, entity.name.tag.wildcard.css | #001B42 | |
| variable.css, variable.argument.css | #0A0A0A | — |
| source.css.scss keyword.control, source.css.less keyword.control | #001B42 | italic |
| source.go entity.name.function, source.go support.function | #052616 | — |
| source.go entity.name.type | #2E0033 | — |
| source.go keyword, source.go keyword.control, source.go storage.type | #001B42 | — |
| source.rust entity.name.function, source.rust support.function | #052616 | — |
| source.rust entity.name.type, source.rust storage.type.core.rust | #2E0033 | — |
| source.rust entity.name.lifetime | #361B00 | italic |
| source.rust meta.attribute.rust | #2E0033 | italic |
| source.c keyword, source.cpp keyword, source.c storage.type, source.cpp storage.type | #001B42 | — |
| source.c entity.name.function, source.cpp entity.name.function | #052616 | — |
| source.c entity.name.type, source.cpp entity.name.type | #2E0033 | — |
| source.c meta.preprocessor, source.cpp meta.preprocessor | #001B42 | italic |
| source.shell keyword, source.shell keyword.control, source.shell storage.type | #001B42 | — |
| source.shell entity.name.function, source.shell support.function | #052616 | — |
| source.shell variable, source.shell variable.other | #0A0A0A | — |
| meta.embedded.block, source.groovy.embedded | #0A0A0A | — |
| source.yaml entity.name.tag, source.yaml punctuation.definition.block.sequence.item | #052616 | — |
| source.toml entity.name.tag, source.toml support.type.property-name | #052616 | — |
| source.toml entity.name.section, source.toml entity.name.section.group-title | #2E0033 | bold |
| source.sql keyword | #001B42 | — |
| source.sql entity.name | #052616 | — |
| source.sql support.function | #052616 | — |
| source.sql constant.other.database-name, source.sql constant.other.table-name | #2E0033 | — |
| entity.name.tag.component, support.class.component, entity.name.tag.other.html | #4A2000 | — |
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}!`;
}