Viper Black
Publisher: MightySnakeThemes in package: 1
A sleek, deep-black theme with neon green accents for a modern terminal aesthetic.
A sleek, deep-black theme with neon green accents for a modern terminal aesthetic.
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 | #079726 | italic |
| support.type.property-name.css, meta.property-name.css, entity.other.attribute-name.css | #818CF8 | — |
| keyword, storage.type, storage.modifier, keyword.control | #C084FC | — |
| variable, variable.parameter, string constant.other.placeholder, meta.block variable.other, support.other.variable | #DCDCDC | — |
| entity.name.function, meta.function-call, variable.function, support.function, keyword.other.special-method, entity.name.method.js | #60A5FA | — |
| entity.name.type, entity.name.class, support.type, support.class | #FBBF24 | — |
| string, constant.other.symbol | #86EFAC | — |
| constant.numeric, constant.language, support.constant, constant.character, keyword.other.unit | #EAB308 | — |
| keyword.operator, punctuation, meta.tag, constant.character.escape | #9CA3AF | — |
| entity.name.tag | #F472B6 | — |
| entity.other.attribute-name | #F59E0B | italic |
| invalid, invalid.illegal | #EF4444 | — |
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}!`;
}