Warm Orange Theme
Publisher: JerryJThemes in package: 1
一个温暖柔和的橙色主题,适合长时间编码使用
一个温暖柔和的橙色主题,适合长时间编码使用
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, punctuation.definition.comment | #9e9e9e | italic |
| string.quoted.triple.python, string.quoted.docstring.multi.python, string.quoted.docstring.multi.python punctuation.definition.string.begin, string.quoted.docstring.multi.python punctuation.definition.string.end | #9e9e9e | italic |
| string.quoted, string.unquoted | #5c7a45 | — |
| string.quoted.f | #4a6540 | — |
| string.quoted.r | #5c7a45 | — |
| string.quoted.b | #4a6540 | — |
| constant.numeric | #c2410c | — |
| constant.language | #dc2626 | — |
| constant.language.none | #9ca3af | — |
| keyword.control | #F31518 | bold |
| keyword.operator | #c2410c | — |
| keyword.declaration, storage.type | #15803d | — |
| keyword.import | #15803d | — |
| entity.name.function, meta.function | #2563eb | — |
| support.function.builtin | #dc2626 | — |
| meta.method | #2563eb | — |
| entity.name.class, storage.class, entity.name.type.class, support.class, entity.name.class.python | #d69e2e | bold |
| entity.other.inherited-class, entity.other.inherited-class.python, entity.name.type.class.inherited, support.type.python | #d69e2e | italic |
| meta.decorator, entity.name.function.decorator | #ea580c | — |
| variable.parameter | #6b4423 | — |
| variable.other, variable | #6b4423 | — |
| variable.other.member, variable.other.object.property, meta.member.access, meta.property.object, support.variable.property, variable.other.property, entity.name.function.member, meta.method-call, support.function.magic, support.function.builtin.python, entity.name.function.decorator.python | #c94c00 | — |
| variable.language.self | #0891b2 | italic |
| variable.other.property | #c94c00 | — |
| support | #dc2626 | — |
| support.type | #0891b2 | — |
| meta.type.hint, storage.type.hint | #0891b2 | italic |
| keyword.control.exception | #F31518 | bold |
| entity.name.exception | #b45309 | — |
| storage.modifier.async | #0891b2 | — |
| keyword.control.await | #0891b2 | bold |
| keyword.declaration.lambda | #15803d | bold |
| keyword.control.flow | #F31518 | — |
| keyword.control.flow.return, keyword.control.yield | #F31518 | — |
| keyword.declaration.global, keyword.declaration.nonlocal | #15803d | — |
| keyword.control.with | #c2410c | — |
| keyword.as | #15803d | — |
| keyword.operator.logical | #c2410c | — |
| keyword.operator.comparison | #8a7d68 | — |
| keyword.operator.arithmetic | #8a7d68 | — |
| keyword.operator.bitwise | #8a7d68 | — |
| keyword.operator.assignment | #8a7d68 | — |
| keyword.operator.assignment.walrus | #c2410c | — |
| entity.name.function.dunder | #dc2626 | — |
| variable.other.readwrite.dunder | #dc2626 | — |
| variable.other.readwrite.private | #6b4423 | — |
| meta.index | #6b4423 | — |
| meta.slice | #6b4423 | — |
| meta.mapping | #5c4a3a | — |
| meta.mapping.key | #6b4423 | — |
| constant.other.ellipsis | #9ca3af | — |
| variable.parameter, variable | #6b4423 | — |
| entity.name.command | #c94c00 | — |
| string.quoted.double, string.quoted.single | #5c7a45 | — |
| keyword.control, keyword.operator | #F31518 | — |
| comment.line.shebang | #9ca3af | italic |
| entity.name.function.shell | #2563eb | — |
| sh.operator | #8a7d68 | — |
| keyword.operator.redirect | #c94c00 | — |
| word.parameter | #d97706 | — |
| punctuation | #8a7d68 | — |
| punctuation.definition.brackets | #8a7d68 | — |
| punctuation.definition.string | #8a7d68 | — |
| invalid | #d32f2f | — |
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}!`;
}