Modal Dark
Publisher: Harmya BhattThemes in package: 1
A dark theme with a green accent.
A dark theme with a green accent.
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, string.quoted.docstring | #5d5d5d | italic |
| string, string.quoted | #c8f9b6 | — |
| string.regexp | #ff8de6 | — |
| constant.character.escape | #ffab5e | — |
| constant.numeric, constant.language | #ffab5e | — |
| constant.other, constant.other.color | #ffab5e | — |
| keyword, keyword.control, storage.type, storage.modifier | #ff8de6 | — |
| keyword.operator, keyword.operator.expression | #91c8ef | — |
| keyword.operator.new, keyword.operator.delete | #ff8de6 | — |
| entity.name.function, support.function, meta.function-call.generic | #7fee64 | bold |
| entity.name.type, entity.name.class, support.type, support.class, entity.other.inherited-class | #ffea71 | — |
| entity.name.tag | #7fee64 | — |
| entity.name.tag.css, entity.other.attribute-name.class.css, entity.other.attribute-name.id.css | #7fee64 | — |
| entity.other.attribute-name | #ff8de6 | italic |
| variable, variable.other, variable.other.readwrite | #d1d1d1 | — |
| variable.parameter | #a3a3a3 | — |
| variable.language, variable.language.self, variable.language.this | #8b8b8b | italic |
| meta.decorator, entity.name.function.decorator, punctuation.decorator | #ffab5e | — |
| punctuation, meta.brace, meta.delimiter | #8b8b8b | — |
| punctuation.definition.string, punctuation.definition.string.begin, punctuation.definition.string.end | #c8f9b6 | — |
| support.module, entity.name.import, entity.name.package, entity.name.namespace | #7fee64 | — |
| support.variable, support.constant | #91c8ef | — |
| markup.heading, entity.name.section | #7fee64 | bold |
| markup.bold | #e8e8e8 | bold |
| markup.italic | #e8e8e8 | italic |
| markup.inline.raw, markup.fenced_code | #ff8de6 | — |
| markup.list | #d1d1d1 | — |
| markup.quote | #8b8b8b | italic |
| markup.link, markup.underline.link | #91c8ef | — |
| markup.inserted | #7fee64 | — |
| markup.deleted | #f87171 | — |
| markup.changed | #ffab5e | — |
| invalid, invalid.illegal | #f87171 | underline |
| meta.embedded, source.groovy.embedded | #d1d1d1 | — |
| punctuation.section.embedded, punctuation.definition.template-expression | #ff8de6 | — |
| meta.diff.header | #91c8ef | — |
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}!`;
}