GreenUI
Publisher: Ihor KolodiiThemes in package: 1
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 |
|---|---|---|
| storage, keyword, keyword.operator.expression, keyword.operator.new, support.type.object.module, punctuation.definition.block.tag.jsdoc, keyword.operator.logical.scss, keyword.operator.logical.python, punctuation.definition.keyword.scss | #20B090 | — |
| entity.name.tag, support.variable.object.process, support.variable.property.process, support.variable.object.node, variable.language.this, variable.other.jsdoc, variable.scss | #E07070 | — |
| entity.name.function, support.function, storage.type.function.arrow, variable.language.super, entity.other.attribute-name.id.css | #d5c07ffb | — |
| string, punctuation.definition.string, entity.other.attribute-name.class.css, meta.attribute-selector.scss, punctuation.definition.entity.css | #93b478 | — |
| entity, support | #E0B070 | — |
| constant, entity.other.attribute-name, support.type, entity.name.type.instance.jsdoc, support.constant.property-value.css, keyword.other.unit, variable.parameter.url.scss, support.variable.magic.python, constant.character.format.placeholder.other.python | #6bbcd5cf | — |
| meta.template.expression, support.variable.property, support.type.property-name.json, entity.name.tag.yaml, support.type.map.key.scss, support.type.property-name.css, entity.name.tag.reference.scss, entity.other.attribute-name.scss, support.type.property-name.media.css, constant.other.caps.python, variable.other.constant entity.name.function, constant.language.import-export-all | #bababa | — |
| punctuation, comment, keyword.operator, meta.brace | #adadad | — |
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}!`;
}