JMFramework for VS Code
Publisher: JMFrameworkThemes in package: 2
Official VS Code extension for JMFramework with syntax highlighting, snippets, and development tools
Official VS Code extension for JMFramework with syntax highlighting, snippets, and development tools
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 | #A0AEC0 | — |
| string, string.template, punctuation.definition.string | #48BB78 | — |
| keyword, storage.type, storage.modifier, support.type.primitive | #805AD5 | — |
| entity.name.function, support.function, meta.function-call | #4299E1 | — |
| variable, variable.parameter, variable.other | #2D3748 | — |
| variable.other.property, variable.other.object | #F6AD55 | — |
| entity.name.type, entity.name.type.class, entity.name.type.interface | #805AD5 | — |
| constant, constant.numeric, constant.language, constant.character, constant.other | #F6AD55 | — |
| keyword.operator, keyword.operator.arithmetic, keyword.operator.logical, keyword.operator.bitwise, keyword.operator.comparison, keyword.operator.assignment | #4299E1 | — |
| punctuation, punctuation.terminator, punctuation.separator, punctuation.definition | #A0AEC0 | — |
| keyword.control.jmf, support.function.jmf, entity.name.type.jmf, variable.other.jmf, constant.language.jmf | #805AD5 | — |
| entity.name.type.component.jmf, keyword.control.component.jmf | #4299E1 | — |
| entity.name.type.style.jmf, keyword.control.style.jmf | #48BB78 | — |
| variable.other.property.jmf, keyword.control.property.jmf | #F6AD55 | — |
| support.function.dynamic.jmf, keyword.control.dynamic.jmf | #805AD5 | — |
| entity.name.type.module.jmf, keyword.control.module.jmf | #4299E1 | — |
| entity.name.type.template.jmf, keyword.control.template.jmf | #48BB78 | — |
| entity.name.type.config.jmf, keyword.control.config.jmf | #F6AD55 | — |
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}!`;
}