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 | #b0b0b0 | italic |
| keyword, storage.type, storage.modifier | #ffcc66 | bold |
| keyword.control, keyword.operator | #ffcc66 | bold |
| string, string.quoted | #99ff99 | — |
| constant.numeric, constant.language | #ff99ff | — |
| constant.character.escape | #66ffcc | — |
| entity.name.function, support.function | #66ccff | bold |
| entity.name.class, entity.name.type, support.class | #ffff66 | bold |
| variable, variable.other | #ffffff | — |
| variable.parameter | #ffffcc | — |
| entity.name.tag | #ff9999 | bold |
| entity.other.attribute-name | #99ccff | — |
| support.type.property-name | #99ddff | — |
| markup.heading | #ffffff | bold |
| markup.bold | #ffff99 | bold |
| markup.italic | #ff99ff | italic |
| markup.underline | — | underline |
| markup.inline.raw | #99ff99 | — |
| punctuation.definition.tag | #cccccc | — |
| meta.function-call | #66ccff | bold |
| invalid | #ff6666 | 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}!`;
}