Mellow Dusk
Publisher: Mohammed HasanfattaThemes in package: 6
A minimal dark theme with subtle twilight hues.
A minimal dark theme with subtle twilight hues.
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 |
|---|---|---|
| variable, variable.other.readwrite, variable.other.property, variable.other.object.property, meta.object-literal.key, support.type.property-name, meta.definition.variable variable.other.constant, meta.definition.variable variable.other.constant.js, variable.other.constant.property, variable.other.constant.property.js | #d8dae8 | — |
| variable.parameter | #f0a497 | — |
| comment, punctuation.definition.comment | #5d6285 | italic |
| punctuation, punctuation.separator, punctuation.terminator, meta.brace | #8a8eaa | — |
| keyword.operator, keyword.operator.assignment, keyword.operator.arithmetic, keyword.operator.logical, keyword.operator.arrow, storage.type.function.arrow | #7fd3e6 | — |
| string, string.quoted, string.template, punctuation.definition.string | #b9e285 | — |
| keyword.control, keyword.operator.new, keyword.operator.expression, storage.type, storage.type.function, storage.type.class | #c89cff | — |
| entity.name.class, entity.name.type, entity.other.inherited-class, support.class, support.type, support.class.builtin, variable.other.object.builtin, variable.other.class | #ffd07a | — |
| entity.name.function, meta.function-call entity.name.function, meta.function-call variable.function, meta.function-call variable.other.property, meta.function-call.method variable.other.property, meta.function-call.method entity.name.function, meta.function-call.method support.function, meta.method.declaration entity.name.function, meta.method.declaration variable.other.property, entity.name.function.constructor, variable.function, support.function, meta.definition.method entity.name.function | #7eb6ff | — |
| constant.numeric, constant.language, constant.character.escape, variable.other.constant | #ffaa7c | — |
| constant.language, storage.modifier | #ff8da1 | — |
| variable.language, support.variable, support.constant, variable.other.object.process, punctuation.definition.template-expression, support.class.console, support.variable.console, storage.modifier.async, storage.modifier.await, keyword.control.async, keyword.other.async, keyword.control.await, keyword.other.await, keyword.control.flow, variable.other.object | #ff8da1 | italic |
| entity.name.tag, punctuation.definition.tag | #ff8da1 | — |
| entity.other.attribute-name | #ffaa7c | — |
| markup.heading | #c89cff | bold |
| markup.bold | #ffd07a | bold |
| markup.italic | #b9e285 | italic |
| markup.inline.raw | #5fd3c0 | — |
| invalid, invalid.illegal | #ff6b6b | underline |
| punctuation.definition.tag, punctuation.definition.tag.begin, punctuation.definition.tag.end, punctuation.definition.tag.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html, punctuation.definition.tag.jsx, punctuation.definition.tag.begin.jsx, punctuation.definition.tag.end.jsx, punctuation.definition.tag.tsx, punctuation.definition.tag.begin.tsx, punctuation.definition.tag.end.tsx | #8a8eaa | — |
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}!`;
}