Jacaré
Publisher: Heber AlmeidaThemes in package: 2
Syntax highlighting, Mesh hover, compile diagnostics, snippets, and icons for Jacaré .jcr files
Syntax highlighting, Mesh hover, compile diagnostics, snippets, and icons for Jacaré .jcr files
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| keyword.control.directive.jacare-ts, meta.directive.jacare-ts | #78c018 | bold |
| entity.name.tag.jacare, entity.name.tag.jacare.contract | #3dd68c | — |
| keyword.control.jacare | #78c018 | bold |
| variable.other.mesh-address.jacare | #9cdcfe | italic |
| keyword.other.contract.jacare | #c586c0 | — |
| meta.embedded.block.typescript.jacare | #d4d4d4 | — |
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| keyword.control.directive.jacare-ts, meta.directive.jacare-ts | #2f6b4f | bold |
| entity.name.tag.jacare, entity.name.tag.jacare.contract | #0b6e4f | — |
| keyword.control.jacare | #2f6b4f | bold |
| variable.other.mesh-address.jacare | #0451a5 | italic |
| keyword.other.contract.jacare | #af00db | — |
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}!`;
}
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}!`;
}