Tiber Language Support
Publisher: Oryvex DistributionThemes in package: 1
Syntax highlighting for the Tiber Android UI automation scripting language
Syntax highlighting for the Tiber Android UI automation scripting 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 |
|---|---|---|
| comment.line.number-sign.tiber | #6A9955 | italic |
| punctuation.definition.label.begin.tiber, punctuation.definition.label.end.tiber | #4FC1FF | — |
| entity.name.label.tiber | #4FC1FF | italic |
| keyword.control.tiber, keyword.control.import.tiber | #C586C0 | — |
| keyword.operator.logical.tiber | #569CD6 | — |
| constant.language.tiber | #79C0FF | — |
| support.function.builtin.tiber | #4EC9B0 | — |
| entity.name.function.definition.tiber, entity.name.function.tiber | #DCDCAA | — |
| variable.other.tiber | #9CDCFE | — |
| entity.name.type.page.tiber, entity.name.type.page.definition.tiber, entity.name.type.rid.definition.tiber | #b5b7fa | — |
| string.quoted.double.tiber, string.quoted.single.tiber, string.quoted.tiber | #CE9178 | — |
| constant.character.escape.tiber | #D7BA7D | — |
| punctuation.definition.string.begin.tiber, punctuation.definition.string.end.tiber | #CE9178 | — |
| constant.numeric.tiber | #B5CEA1 | — |
| keyword.operator.tiber | #D4D4D4 | — |
| punctuation.tiber | #A0A0A0 | — |
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}!`;
}