pure-mono
Publisher: fuufhjn ZhaoThemes in package: 2
Ultimate simplicity, dark theme based on four colors.
Ultimate simplicity, dark theme based on four colors.
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 | #616E88 | italic |
| keyword.control, keyword.control.conditional, keyword.control.loop, keyword.control.return, keyword.control.trycatch, keyword.control.import | #B48EAD | — |
| keyword, keyword.operator.new, storage.type, storage.modifier | #D8DEE9 | — |
| string, constant.other.symbol, constant.other.key, string.regexp | #88C0D0 | — |
| constant.numeric, constant.language, constant.character, constant.escape, keyword.other.unit | #88C0D0 | — |
| entity.name.function, meta.function-call, variable.function, support.function, keyword.other.special-method, entity.name.method | #D8DEE9 | — |
| entity.name.type, entity.name.class, entity.other.inherited-class, support.type, support.class, support.type.sys-types | #88C0D0 | — |
| variable, variable.other, variable.parameter | #D8DEE9 | — |
| variable.language | #88C0D0 | italic |
| entity.name.tag, meta.tag, punctuation.definition.tag | #D8DEE9 | — |
| entity.other.attribute-name | #D8DEE9 | — |
| meta.decorator, punctuation.decorator, tag.decorator.js entity.name.tag.js, tag.decorator.js punctuation.definition.tag.js | #B48EAD | — |
| punctuation.accessor, punctuation.separator, punctuation.terminator | #A8AEB9 | — |
| invalid, invalid.illegal | #B48EAD | — |
| *url*, *link*, *uri* | #D8DEE9 | underline |
| source.json support.type.property-name, source.json meta.structure.dictionary.json support.type.property-name.json, source.json meta.object-literal.key | #88C0D0 | — |
| source.json meta.structure.dictionary.value.json string.quoted, source.json meta.structure.dictionary.value.json string.quoted punctuation.definition.string, source.json meta.structure.array.json string.quoted, source.json meta.structure.array.json string.quoted punctuation.definition.string | #D8DEE9 | — |
| markup.heading, markup.heading entity.name, punctuation.definition.heading.markdown | #B48EAD | — |
| markup.bold | #D8DEE9 | bold |
| markup.italic | #D8DEE9 | italic |
| markup.raw.inline, markup.raw.block | #88C0D0 | — |
| markup.quote | #616E88 | italic |
| string.other.link.title.markdown | #B48EAD | — |
| markup.inserted | #D8DEE9 | — |
| markup.deleted | #D8DEE9 | — |
| markup.changed | #D8DEE9 | — |
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}!`;
}