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 |
|---|---|---|
| string.json.comments | #54AAD8 | — |
| support.type.property-name.json | #d84646 | bold |
| punctuation.definition.dictionary.begin.json, punctuation.definition.dictionary.end.json | #ffffff | — |
| constant.numeric, variable.other.enummember, keyword.operator.plus.exponent, keyword.operator.minus.exponent | #54cedc | — |
| comment | #807C76 | — |
| string.quoted.docstring | #FFF3AA | — |
| punctuation.definition.decorator, punctuation.definition.annotation, entity.name.function.decorator.python, storage.type.annotation.java | #CAAE87 | — |
| storage.type, variable.language, keyword.control, keyword.operator.logical, keyword.other, storage.modifier, support.function, constant.language.python, variable.parameter.function.language.special.self.python, constant.language.json | #c92d44 | bold |
| keyword.other.unit | #B5CEA8 | — |
| source.groovy.embedded, string meta.image.inline.markdown, source.python, meta.function, meta.funcion-call | #d2d2d2 | — |
| entity.name.tag, string.quoted, string.regexp, string.interpolated, string.template, string.unquoted.plain.out.yaml, keyword.other.template | #2d8f44 | — |
| string.python, constant.other.set.regexp, constant.character.set.regexp, storage.type.string.python | #83a70e | — |
| meta.fstring.python | #d2d2d2 | — |
| entity.name.method, support.constant.handlebars, source.powershell variable.other.member, entity.name.function, entity.name.operator.custom-literal, meta.function-call.generic, meta.class.python, support.function.magic.python, support.function.builtin.python, support.type.python | #33d59f | — |
| entity.name.function.python, support.function.magic.python, entity.name.type.class.python | #6AB49B | bold |
| token.info-token | #6796E6 | — |
| token.warn-token | #CD9731 | — |
| token.error-token | #cd3e3e | — |
| token.debug-token | #B267E6 | — |
| string.quoted.docstring.multi.python | #807C76 | — |
| meta.function.parameters.python | #e1754a | — |
| meta.member.access.python | #d1cbab | — |
| meta.function-call.arguments.python | #eb8275 | — |
| constant.other.caps.python | #b66380 | bold underline |
| variable.parameter.function-call.python | #6a9be4 | — |
| keyword.operator.assignment.python | #ffffff | — |
| punctuation.definition.arguments, punctuation.definition.parameters | #fff710 | — |
| entity.name.type, entity.name.namespace, entity.name.scope-resolution, entity.other.inherited-class, support.class | #dbd2a2 | — |
| meta.object.member.js | #e68054 | — |
| meta.function-call | #8eabe9 | — |
| meta.tag.attributes.js | #da7878 | — |
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}!`;
}