Nyx Theme Suite
Publisher: Pratik RanjanThemes in package: 6
A premium, minimalist dark theme suite ported from IntelliJ True Dark, with OLED black and clean light variants.
A premium, minimalist dark theme suite ported from IntelliJ True Dark, with OLED black and clean light variants.
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, punctuation.definition.comment, unused.comment | #7f8aaa | italic |
| keyword, storage.type, storage.modifier, keyword.control | #9543be | italic |
| string, punctuation.definition.string | #ae3a93 | — |
| constant.numeric, keyword.other.unit | #0086a6 | — |
| constant.language, constant.character, support.constant, variable.other.constant | #0086a6 | italic |
| constant.character.escape, constant.escape | #008e76 | — |
| entity.name.function, support.function | #6e51da | — |
| meta.function-call, variable.function | #6e51da | — |
| entity.name.type.class, entity.name.class, support.class | #008d92 | — |
| entity.name.type.interface, support.type | #008d92 | — |
| entity.name.namespace, entity.name.package | #404a66 | — |
| variable.other.property, support.type.property-name, variable.other.object.property | #404a66 | — |
| meta.annotation, entity.name.type.annotation, entity.other.attribute-name, meta.decorator | #0086a6 | — |
| entity.name.tag, punctuation.definition.tag | #549492 | — |
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}!`;
}