Newspaper Theme Mosaulse
Publisher: MosaulseThemes in package: 2
中国老报纸风格 VS Code 主题 - 泛黄纸张、浓黑墨迹、朱砂印章红,Light/Dark 双色系
中国老报纸风格 VS Code 主题 - 泛黄纸张、浓黑墨迹、朱砂印章红,Light/Dark 双色系
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, comment.block, comment.line, comment.block.documentation | #7a8e6a | italic |
| keyword, keyword.control, storage.type, storage.modifier | #a68a2e | bold |
| keyword.operator, keyword.operator.assignment, keyword.operator.arithmetic, keyword.operator.logical | #888888 | — |
| string, string.quoted, string.quoted.single, string.quoted.double, string.regexp | #d8655a | — |
| constant.numeric, constant.numeric.integer, constant.numeric.float | #c41e1e | — |
| constant.language, constant.language.boolean, constant.language.null | #b55a5a | — |
| constant.other, support.constant | #b55a5a | — |
| variable, variable.other, variable.other.readwrite | #d2b48c | — |
| variable.other.constant, variable.language.special | #e06c60 | — |
| entity.name.function, support.function, meta.function-call | #6aabd2 | bold |
| entity.name.type, entity.name.class, entity.name.struct, entity.name.interface, support.type | #6aabd2 | — |
| support.type.property-name, variable.other.property, meta.property-name | #8aab7a | — |
| punctuation, punctuation.separator, punctuation.definition, meta.brace | #888888 | — |
| invalid, invalid.legal, invalid.broken, invalid.deprecated | #c41e1e | underline |
| markup.inserted, meta.diff.header.from-file, marking.inserted | #a3be8c | — |
| markup.deleted, meta.diff.header.to-file, marking.deleted | #e06c60 | — |
| markup.heading, markup.heading.markdown | #8b6914 | bold |
| markup.bold | — | bold |
| markup.italic | — | italic |
| markup.underline.link, markup.underline | #6aabd2 | underline |
| markup.list, markup.list.unordered, markup.list.ordered | #e06c60 | — |
| entity.name.tag, meta.tag, punctuation.definition.tag | #cd853f | — |
| entity.other.attribute-name, entity.other.attribute-name.class, entity.other.attribute-name.id | #b55a5a | — |
| string.quoted.double constant.character.escape, constant.character.escape, constant.character.escape.html | #d8655a | — |
| markup.table, markup.table.markdown | #d4c896 | — |
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}!`;
}