UNPKG

@grammyjs/web-app

Version:

Building blocks for Telegram Web Apps

12 lines (11 loc) 555 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WebApp = void 0; if (typeof window !== "object" || window === null) { console.error("Error: Telegram Web App is not running in a browser environment, window is not accessible!"); } else if (typeof window.Telegram !== "object" || window.Telegram === null) { console.error("Error: Telegram Web App script has not run, see https://core.telegram.org/bots/webapps#initializing-web-apps"); } exports.WebApp = window.Telegram.WebApp; exports.default = window.Telegram;