bananalight
Publisher: Vitaliy StarovThemes in package: 1
Light minimalistic color theme for JS/React development
Light minimalistic color theme for JS/React development
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, variable.other.readwrite.decorator | #822ebe | — |
| variable | #11095e | — |
| entity.name.function, entity.name.class, support.class.builtin, source punctuation, source meta.function meta.brace | #1650cc | — |
| constant.other.object.key.js, variable.other.property, source.json.comments meta.structure punctuation, meta.brace.curly.litobj.js, meta.object.flowtype variable | #5f1111 | — |
| entity.other.attribute-name.jsx | #5f1111 | italic |
| string.quoted, meta.tag.jsx entity.name, source meta.tag.jsx punctuation, source.json.comments meta.structure string.quoted punctuation | #0b7777 | — |
| meta.tag.jsx | #4d4c4c | — |
| comment.line, comment.block, source punctuation.definition.comment | #858585 | — |
| punctuation.flowtype, meta.object.flowtype variable.other.property, support.type.class.flowtype, keyword.object.flowtype, support.type.builtin.primitive.flowtype, support.type.primitive.flowtype | #7d7d92 | — |
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}!`;
}