Excalibur
Publisher: itsakshaydilipThemes in package: 1
A soft, non-standard dark VS Code theme built around muted red and antique gold accents for comfortable everyday coding.
A soft, non-standard dark VS Code theme built around muted red and antique gold accents for comfortable everyday coding.
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 | #879A73 | italic |
| keyword, storage.type, storage.modifier, keyword.operator.logical | #D0A353 | bold |
| entity.name.function, support.function, meta.function-call | #C89A5A | — |
| string, punctuation.definition.string | #C77A6B | — |
| entity.name.type, entity.name.class, support.class, support.type | #A0AA82 | — |
| variable, variable.other.readwrite, variable.other.constant | #D6C08B | — |
| constant.numeric, constant.language, constant.character | #B98B7E | — |
| entity.name.tag, entity.other.attribute-name, support.type.property-name | #B98262 | — |
| keyword.operator, punctuation, meta.brace, meta.delimiter | #AAA198 | — |
| invalid, invalid.illegal | #C86C5E | — |
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}!`;
}