Lavender
Publisher: penrodlolThemes 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 |
|---|---|---|
| storage.type.function | — | italic |
| entity.name.function, meta.method-call.java, text entity.other, meta.object-literal.key | #bd93f9 | bold |
| source.java entity | #ffffff | italic |
| storage.type | #aafcdd | — |
| keyword.control, keyword.operator.expression, keyword.other,entity.name | #fff1c3 | — |
| comment | #7a7a7a | italic |
| variable.parameter, variable.other.property | #b3baff | — |
| string | #80afab | — |
| constant.language, constant.numeric, variable.language.this, variable.language.java, source.java storage.modifier, text.xml entity.name.tag.namespace, text markup, text entity.other.attribute-name.namespace | #b3baff | italic |
| source.java constant, variable.other.constant, keyword.control.export.ts | #BD73FF | bold |
| meta.object-literal.key string.quoted, support.type.property-name.json | #bd93f9 | italic |
| meta.paragraph.markdown | #B9B9B9 | — |
| support.function, support.variable.property | #C586E0 | italic |
| keyword.operator | #7de6e4 | — |
| property | #7d6eff | — |
| keyword.operator.new | #6685FF | — |
| token.info-token | #6796e6 | — |
| token.warn-token | #cd9731 | — |
| token.error-token | #f44747 | — |
| token.debug-token | #b3baff | — |
| entity.name.tag | #b3baff | bold |
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}!`;
}