real-theme
Publisher: lockingrealThemes in package: 2
Use real theme for VS Code
Use real theme for VS Code
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #333333 | — |
| comment | #C0C0C0 | — |
| string | #2bae85 | — |
| constant.numeric | #ed5a65 | — |
| constant.language | #a7535a | — |
| constant.character, constant.other | #a7535a | — |
| variable | — | #1d2129 |
| keyword | #ee3f4d | — |
| storage | #2486b9 | |
| storage.type | #61ac85 | italic |
| entity.name.class | #ffd111 | underline |
| entity.other.inherited-class | #fba414 | italic underline |
| entity.name.function | #fba414 | |
| variable.parameter | #fecc11 | italic |
| entity.name.tag | #bc84a8 | |
| entity.other.attribute-name | #a7535a | |
| support.function | #fba414 | |
| support.constant | #fbda41 | |
| support.type, support.class | #2177b8 | italic |
| support.other.variable | — | #F92672 |
| invalid | #F8F8F0 | |
| invalid.deprecated | #F8F8F0 | — |
| markup.quote | #22aa44 | — |
| markup.bold, markup.italic | #22aa44 | — |
| markup.inline.raw | #fbda41 | |
| markup.heading.setext | #FFFFFF | |
| ----------------------------------- | — | — |
| meta.diff.range, meta.diff.index, meta.separator | #434343 | — |
| meta.diff.header.from-file | #434343 | — |
| meta.diff.header.to-file | #434343 | — |
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}!`;
}