pstel_jsh
Publisher: Josh SThemes 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 | #6752C9 | italic |
| string | #CDABAD | — |
| constant.language | #F7F7F7 | — |
| constant.character, constant.other | #F7F7F7 | — |
| variable | #AFA3EE | — |
| keyword | #6A86B3 | — |
| entity.name.class, entity.name.type | #9469B5 | underline |
| entity.name.function | #67B6BD | |
| entity.name.tag | #67B6BD | |
| support.type, support.class | #67B6BD | — |
| support.other.variable | #67B6BD | — |
| comment | #20A795CC | — |
| punctuation.definition.comment | #20A795CC | — |
| string | #6D88FF | — |
| meta.embedded.assembly | #6D88FF | — |
| keyword - keyword.operator | #6D88FF | — |
| keyword.control | #6D88FF | — |
| storage | #6D88FF | — |
| storage.type | #6D88FF | — |
| constant.numeric | #6D88FF | — |
| entity.name.type | #20A795 | — |
| entity.name.class | #20A795 | — |
| support.type | #20A795 | — |
| support.class | #20A795 | — |
| entity.name.function | #DA5E98 | — |
| support.function | #DA5E98 | — |
| variable | #6D88FF | — |
| entity.name.variable | #6D88FF | — |
| keyword.operator.assignment | #FFFFFF | — |
| keyword.operator.logical | #DA5E98 | — |
| keyword.operator.arithmetic | #FFFFFF | — |
| keyword.control | #FFFFFF | — |
| support.variable | #6D88FF | — |
| meta.block | #DA5E98 | — |
| entity.name.function | #DA5E98 | — |
| variable.language | #20A795 | — |
| variable.other.readwrite | #DA5E98 | — |
| punctuation | #FFFFFF | — |
| token.info-token | #6796E6 | — |
| token.warn-token | #CD9731 | — |
| token.error-token | #F44747 | — |
| token.debug-token | #B267E6 | — |
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}!`;
}