minhao_theme
Publisher: Minhao WangThemes 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 |
|---|---|---|
| — | #24292eff | — |
| keyword.operator.accessor, meta.group.braces.round.function.arguments, meta.template.expression, markup.fenced_code meta.embedded.block | #24292eff | — |
| emphasis | — | italic |
| strong, markup.heading.markdown, markup.bold.markdown | — | bold |
| markup.italic.markdown | — | italic |
| meta.link.inline.markdown | #1976D2 | underline |
| string, markup.fenced_code, markup.inline | #2b5581 | — |
| comment, string.quoted.docstring.multi | #a1a3a7 | italic |
| source.python | #499504 | — |
| constant.numeric, constant.language, constant.other.placeholder, constant.character.format.placeholder, variable.language.this, variable.other.object, variable.other.class, variable.other.constant, meta.property-name, meta.property-value, support | #1976D2 | — |
| keyword, storage.modifier, storage.type, storage.control.clojure, entity.name.function.clojure, entity.name.tag.yaml, support.function.node, support.type.property-name.json, punctuation.separator.key-value, punctuation.definition.template-expression | #d32f2f | bold |
| variable.parameter.function | #FF9800 | — |
| support.function, entity.other.inherited-class, meta.function-call, meta.instance.constructor, entity.other.attribute-name, entity.name.function, constant.keyword.clojure | #6f42c1 | — |
| entity.name.type | #3a9499 | bold underline |
| entity.name.tag, string.quoted, string.regexp, string.interpolated, string.template, string.unquoted.plain.out.yaml, keyword.other.template | #22863a | — |
| token.info-token | #316bcd | — |
| token.warn-token | #cd9731 | — |
| token.error-token | #cd3131 | — |
| token.debug-token | #800080 | — |
| strong, markup.heading.markdown, markup.bold.markdown | #6f42c1 | — |
| punctuation.definition.arguments, punctuation.definition.dict, punctuation.separator, meta.function-call.arguments | #212121 | — |
| markup.underline.link, punctuation.definition.metadata.markdown | #22863a | — |
| beginning.punctuation.definition.list.markdown | #6f42c1 | — |
| punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, string.other.link.title.markdown, string.other.link.description.markdown | #d32f2f | — |
| variable, source.python | #363336 | — |
| entity.name.namespace | #FF0000 | bold |
| constant.other.caps.python | #5800e6 | bold |
| variable.parameter.function-call.python | #d30000 | — |
| meta.function.decorator.python | — | 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}!`;
}