scripts/src/global.d.ts

37 lines
713 B
TypeScript
Raw Normal View History

2022-12-31 10:15:23 +00:00
export {};
declare global {
interface Window {
game_data: {
group_id: number;
player: {
id: number;
};
village: {
id: number;
};
2023-01-16 06:32:06 +00:00
market: string;
2022-12-31 10:15:23 +00:00
locale: string;
screen: string;
mode: string | null;
2023-01-16 06:32:06 +00:00
world: string;
2022-12-31 10:15:23 +00:00
};
TribalWars: {
redirect: (queryParams: Record<string, string>) => void;
2023-01-16 06:32:06 +00:00
buildURL: (
method: string,
screen: string,
params: Record<string, string>
) => string;
2022-12-31 10:15:23 +00:00
};
UI: {
InfoMessage: (s: string) => void;
ErrorMessage: (s: string) => void;
};
2023-01-16 06:32:06 +00:00
Dialog: {
show: (id: string, html: string) => void;
2023-01-22 10:43:50 +00:00
close: () => void;
2023-01-16 06:32:06 +00:00
};
2022-12-31 10:15:23 +00:00
}
}