Moxie.Build
Publisher: Wisebox Solutions Inc.Themes in package: 2
Provides code snippets, color themes, syntax recognition and more for the Mox programming language.
Provides code snippets, color themes, syntax recognition and more for the Mox programming language.
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 |
|---|---|---|
| — | #7099AF | — |
| extra.inside-double-quotes.colors.mox | #808080 | — |
| database-functions.colors.mox, extra.numbers.colors.mox | #D16969 | — |
| operators.colors.mox | #CE9178 | — |
| keywords.colors.mox, attributes.colors.mox, top-query-functions.colors.mox | #9CDCFE | — |
| comments.block.colors.mox, comments.line.colors.mox | #608B4E | — |
| built-in-variables.colors.mox | #F44747 | — |
| work-query-functions.colors.mox | #646695 | — |
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}!`;
}