Agent Jay Theme
Publisher: yonniferThemes in package: 2
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 |
|---|---|---|
| — | #8599b3ff | — |
| comment | #5b6480 | — |
| string | #0fcccc | — |
| constant.numeric | #0fcccc | — |
| constant.language | #0fcccc | — |
| constant.character, constant.other | #0fcccc | — |
| variable | #4896ce | |
| keyword | #868aff | — |
| storage | #868aff | |
| storage.type | #868aff | italic |
| entity.name.class | #e6629b | bold |
| entity.other.inherited-class | #e6629b | italic |
| entity.name.function | #e6629b | — |
| variable.parameter | #52bcfd | italic |
| entity.name.tag | #868aff | |
| entity.other.attribute-name | #e6629b | — |
| support.function | #45B8FF | — |
| support.constant | #45B8FF | |
| support.type, support.class | #45B8FF | italic |
| support.other.variable | — | |
| invalid | #c6afec | |
| invalid.deprecated | #B2AFF0 | — |
| token.info-token | #6796e6 | — |
| token.warn-token | #e2b664 | — |
| token.error-token | #ec6262 | — |
| token.debug-token | #a768d3 | — |
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}!`;
}