applikose
Publisher: ApplikoseThemes in package: 1
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| comment | #00cc77 | — |
| entity | #00cccc | — |
| entity.name | #00cccc | — |
| entity.other.attribute-name | #88dd00 | — |
| keyword | #88dd00 | — |
| meta | #009999 | — |
| meta.block | #009999 | — |
| string | #ff0099 | — |
| punctuation.definition.string.begin | #ffaaee | — |
| punctuation.definition.string.end | #ffaaee | — |
| punctuation.separator | #cccccc | — |
| punctuation.terminator | #cccccc | — |
| storage | #009999 | — |
| support | #cccc00 | — |
| support.type | #33dd00 | — |
| variable | #00cccc | — |
| punctuation.definition.tag.begin | #009999 | — |
| punctuation.definition.tag.end | #009999 | — |
| source | #009999 | — |
| punctuation.definition.block.begin, punctuation.definition.block.end, punctuation.definition.parameters.begin, punctuation.definition.parameters.end | #cccccc | — |
| constant.language | #ffcc00 | — |
| #FF0000 | — |
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}!`;
}