telegram-miniapp-tools
Version:
Tools for working with Telegram Miniapps
32 lines (31 loc) • 796 B
TypeScript
/**
* The library provides direct access to the Telegram WebApp and environment variables.
*
* @example
* ```typescript
* import telegram, { webApp } from "telegram-miniapp-tools";
*
* console.log(webApp.initData);
* console.log(telegram);
* ```
*
* @module
*/
import { Telegram, WebApp } from "./types/index.js";
/**
* Represents the Telegram global object available on the `window`.
*
* Provides access to Telegram Web App features and methods.
*
* @see https://core.telegram.org/bots/webapps
*/
declare const telegram: Telegram;
/**
* Represents the Telegram Web App instance.
*
* Provides methods and properties specific to the Web App interface.
*
* @see https://core.telegram.org/bots/webapps
*/
declare const webApp: WebApp;
export { webApp, telegram as default };