scripts/src/global.d.ts

38 lines
735 B
TypeScript

export {};
declare global {
interface Window {
game_data: {
group_id: number;
player: {
id: number;
name: string;
};
village: {
id: number;
};
market: string;
locale: string;
screen: string;
mode: string | null;
world: string;
};
TribalWars: {
redirect: (queryParams: Record<string, string>) => void;
buildURL: (
method: string,
screen: string,
params: Record<string, string>
) => string;
};
UI: {
InfoMessage: (s: string) => void;
ErrorMessage: (s: string) => void;
};
Dialog: {
show: (id: string, html: string) => void;
close: () => void;
};
}
}