fix window
This commit is contained in:
@@ -13,12 +13,10 @@ interface TelegramWebApp {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
interface WindowWithTelegram extends Window {
|
||||||
interface Window {
|
|
||||||
Telegram?: {
|
Telegram?: {
|
||||||
WebApp: TelegramWebApp;
|
WebApp: TelegramWebApp;
|
||||||
};
|
};
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface VideoResult {
|
interface VideoResult {
|
||||||
@@ -48,7 +46,7 @@ class QuixoticApp {
|
|||||||
private noResults!: HTMLElement;
|
private noResults!: HTMLElement;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.tg = window.Telegram?.WebApp;
|
this.tg = (window as WindowWithTelegram).Telegram?.WebApp;
|
||||||
this.init();
|
this.init();
|
||||||
this.bindEvents();
|
this.bindEvents();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user