From 8213ca33e2b32d7248a9a9d3c17df26fcde86739 Mon Sep 17 00:00:00 2001 From: Andrey Kondratev <81143241+cockroach-eater@users.noreply.github.com> Date: Thu, 28 Aug 2025 17:22:39 +0500 Subject: [PATCH] fix window --- public/script.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/public/script.ts b/public/script.ts index e571597..f79a329 100644 --- a/public/script.ts +++ b/public/script.ts @@ -13,12 +13,10 @@ interface TelegramWebApp { }; } -declare global { - interface Window { - Telegram?: { - WebApp: TelegramWebApp; - }; - } +interface WindowWithTelegram extends Window { + Telegram?: { + WebApp: TelegramWebApp; + }; } interface VideoResult { @@ -48,7 +46,7 @@ class QuixoticApp { private noResults!: HTMLElement; constructor() { - this.tg = window.Telegram?.WebApp; + this.tg = (window as WindowWithTelegram).Telegram?.WebApp; this.init(); this.bindEvents(); }