monotone
Publisher: 0x706bThemes in package: 1
An aesthetically-pleasing utilitarian theme, forked from Lokaltog/vim-monotone
An aesthetically-pleasing utilitarian theme, forked from Lokaltog/vim-monotone
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 | #787271 | italic |
| storage.type, variable.parameter, meta.parameters | #bebaba | italic |
| punctuation.definition.comment | #787271 | — |
| keyword.operator | #d86363 | bold |
| meta.definition.variable | #5e5959 | bold |
| meta.decorator, keyword.control.import, keyword.control.export, keyword.control.from, keyword.control.loop, keyword.other.haskell, keyword.control.as, keyword.control.conditional, storage.type.function.arrow, entity.name.tag | #bebaba | bold |
| punctuation, meta.brace | #d86363 | normal |
| variable, meta.definition.function | #bebaba | normal |
| meta.type, meta.return.type, entity.name.type, support.class.component | #81a7bb | bold |
| storage.modifier, keyword.control.flow, keyword.other.big-arrow.haskell, keyword.other.arrow.haskell, support.type.primitive, support.type.builtin, storage.type.type, storage.type.interface | #bebaba | bold |
| constant.character, string, punctuation.definition.string | #8db18a | — |
| constant.character.escape | #bebaba | bold |
| storage, keyword.control.type, keyword.operator.expression.is, punctuation.definition.template-expression, punctuation.terminator | #bebaba | bold |
| constant.language.boolean, constant.language.undefined, constant.language.null, constant.numeric | #d8a763 | — |
| strong | — | bold |
| invalid | #bbbbbb88 | italic underline |
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}!`;
}