Leonic
Publisher: Leon J. LeeThemes in package: 2
A VS Code theme palette: Light evokes writing on warm hanji in a traditional study, while Dark recalls the late-1990s telnet revival.
A VS Code theme palette: Light evokes writing on warm hanji in a traditional study, while Dark recalls the late-1990s telnet revival.
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 | #a0a0a0 | — |
| comment.block.documentation, comment.documentation | #9fb2ac | italic |
| keyword, storage.type, storage.modifier, keyword.control, keyword.operator.new | #009610 | — |
| string, string.quoted, string.template | #9d7124 | — |
| constant.character.escape, constant.regexp | #9d7124 | — |
| constant.numeric | #e06600 | — |
| constant.language, constant.other, variable.other.constant, support.constant | #8000c2 | — |
| entity.name.function, support.function, meta.function-call entity.name.function | #e0218a | — |
| support.function.builtin | #e0218a | — |
| entity.name.type, entity.name.class, support.type, support.class, entity.other.inherited-class, entity.name.type.parameter, entity.name.type.enum | #0036e0 | — |
| entity.name.type.interface | #0a6e7a | — |
| entity.name.namespace | #2e2e2e | — |
| variable.parameter | #000000 | italic |
| variable.language.this, variable.language.self | #000000 | — |
| variable.other.property.js, variable.other.property.ts, variable.other.object.property.js, variable.other.object.property.ts, meta.object-literal.key | #000000 | — |
| entity.name.tag, punctuation.definition.tag | #009610 | — |
| entity.other.attribute-name | #7b3005 | — |
| meta.decorator, entity.name.function.decorator, punctuation.definition.decorator | #0a6e7a | underline |
| keyword.other.unit, support.type.property-name | #8000c2 | — |
| invalid | #ff0000 | — |
| variable, variable.other | #000000 | — |
| string.unquoted.plain.out.yaml, string.unquoted.plain.in.yaml, string.quoted.single.yaml, string.quoted.double.yaml, string.unquoted.block.yaml | #9d7124 | — |
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}!`;
}