Visual Studio Pro
Publisher: DiquahThemes in package: 1
A color theme for late-night coding.
A color theme for late-night 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 | #937654 | — |
| keyword | #c27c49 | bold |
| storage.modifier | #c27c49 | bold |
| keyword.operator | #a3a2a2 | |
| keyword.operator.borrow | #c27c49 | — |
| punctuation | #a3a2a2 | — |
| punctuation.definition | #5b9453 | — |
| punctuation.definition.string | #5b9453 | — |
| punctuation.definition.attribute | #b3ac60 | — |
| punctuation.brackets.attribute | #b3ac60 | — |
| meta.attribute | #b3ac60 | — |
| string | #5b9453 | — |
| constant.numeric | #65b0aa | — |
| constant.language | #c27c49 | — |
| entity.name.function | #649BD2 | — |
| entity.name.function.macro | #b3ac60 | — |
| entity.name.type.option | #c77dbb | — |
| entity.name.type.struct | #b67797 | — |
| entity.name.type.enum | #b67797 | — |
| entity.name.type.primitive | #c27c49 | — |
| punctuation.definition | #a3a2a2 | — |
| punctuation.support.type.property-name | #b67797 | — |
| support.type.property-name | #b67797 | — |
| punctuation.definition | #a3a2a2 | — |
| support.type.property-name.toml | #c1bebe | — |
| support.type.property-name.table | #b67797 | — |
| entity.name.tag | #b67797 | — |
| storage.type.built-in | #c27c49 | — |
| storage.modifier.array | #a3a2a2 | |
| support.function | #649BD2 | — |
| punctuation.definition.comment | #937654 | — |
| storage.type.class | #c27c49 | bold |
| storage.type.function | #c27c49 | bold |
| variable.language.special | #b67797 | — |
| variable.parameter.function.language.special | #b67797 | — |
| meta.attribute.python | #c1bebe | — |
| punctuation.definition.decorator | #b3ac60 | — |
| entity.name.function.decorator | #b3ac60 | — |
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}!`;
}