Green Pro
Publisher: chaoxThemes in package: 2
浅色护眼绿主题。低亮度纸绿底 + 等明度六色相语法分色,为长时间编码设计。A low-glare paper-green light theme for long coding sessions.
浅色护眼绿主题。低亮度纸绿底 + 等明度六色相语法分色,为长时间编码设计。A low-glare paper-green light theme for long coding sessions.
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, keyword.other, storage, storage.type, storage.modifier | #7E3A9E | bold |
| entity.name.function, meta.function-call, support.function, meta.function-call.generic, entity.name.method | #175CA8 | — |
| entity.name.type, entity.name.class, entity.name.type.interface, entity.other.inherited-class, support.type, support.class, entity.name.namespace | #0B6478 | — |
| variable.other.property, variable.other.object.property, meta.object-literal.key, support.variable.property, entity.other.attribute-name | #8A6208 | — |
| string, string.quoted, string.template, string.regexp | #93500F | — |
| constant.numeric, constant.language, constant.character, support.constant, variable.other.constant | #A82A64 | — |
| entity.name.tag, support.class.component, meta.tag.sgml | #B02E3E | — |
| variable.parameter | #3E4C43 | — |
| variable, variable.other, variable.other.readwrite, meta.definition.variable | #2C3A33 | — |
| keyword.operator, punctuation, punctuation.separator, punctuation.terminator, punctuation.accessor, punctuation.definition.parameters, punctuation.definition.array, punctuation.definition.block, punctuation.definition.string, punctuation.definition.tag, meta.brace | #55635B | — |
| invalid, invalid.illegal | #B02E3E | — |
| markup.heading, entity.name.section | #7E3A9E | bold |
| markup.bold | — | bold |
| markup.italic | — | italic |
| 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 | #6F7C74 | italic |
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}!`;
}
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}!`;
}