护眼纸绿
Publisher: chaoxThemes in package: 1
浅色护眼绿主题:暖纸绿 UI + Styri 风格语法色。修复注释斜体被标点规则覆盖。仅颜色主题,不含字体/习惯配置。
浅色护眼绿主题:暖纸绿 UI + Styri 风格语法色。修复注释斜体被标点规则覆盖。仅颜色主题,不含字体/习惯配置。
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 |
|---|---|---|
| keyword, keyword.control, storage, storage.type, storage.modifier | #0E6B45 | bold |
| variable, variable.other, variable.parameter, meta.definition.variable | #1565A0 | — |
| entity.name.function, meta.function-call, support.function | #1565A0 | bold |
| string, string.quoted, string.template | #8A5A10 | — |
| constant.numeric, constant.language, constant.character | #A01870 | — |
| entity.name.type, entity.name.class, support.type, support.class, entity.name.type.interface | #0A6A7A | bold |
| entity.name.tag | #A01870 | bold |
| entity.other.attribute-name | #1565A0 | — |
| keyword.operator, punctuation.separator, punctuation.terminator, punctuation.accessor, punctuation.definition.parameters, punctuation.definition.array, punctuation.definition.block, meta.brace | #3A4638 | — |
| invalid, invalid.illegal | #C02040 | — |
| comment, comment.line, comment.line.double-slash, comment.line.double-dash, comment.line.number-sign, comment.block, comment.block.documentation, punctuation.definition.comment, punctuation.definition.comment.begin, punctuation.definition.comment.end | #4A5A58 | italic |
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}!`;
}