Smit Dark Theme
Publisher: Smit DudhatThemes in package: 23
A comprehensive dark theme collection with 23 unique variants including the new Black Slate theme - from minimal to cyberpunk, soft to high-contrast!
A comprehensive dark theme collection with 23 unique variants including the new Black Slate theme - from minimal to cyberpunk, soft to high-contrast!
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 | #6c7a99 | italic |
| keyword, storage.type, storage.modifier | #cba6f7 | bold |
| keyword.control, keyword.operator | #cba6f7 | bold |
| string, string.quoted | #a6e3a1 | — |
| constant.numeric, constant.language | #fab387 | — |
| constant.character.escape | #f9e2af | — |
| entity.name.function, support.function | #89b4fa | bold |
| entity.name.class, entity.name.type, support.class | #f9e2af | bold |
| variable, variable.other | #e0e8ff | — |
| variable.parameter | #f5c2e7 | — |
| entity.name.tag | #f38ba8 | bold |
| entity.other.attribute-name | #cba6f7 | — |
| support.type.property-name | #89dceb | — |
| markup.heading | #89b4fa | bold |
| markup.bold | #f9e2af | bold |
| markup.italic | #cba6f7 | italic |
| markup.underline | — | underline |
| markup.inline.raw | #a6e3a1 | — |
| punctuation.definition.tag | #7f849c | — |
| meta.function-call | #89b4fa | — |
| invalid | #f38ba8 | bold |
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}!`;
}