7.10.0 • Published 1 year ago
telegram-webapps v7.10.0
Usage
Instal
via npm :
npm install telegram-webapps --save-devvia yarn :
yarn add -D telegram-webappsvia pnpm :
pnpm add -D telegram-webappsUse typings
Include the types file inside your  tsconfig.json  file like this:
{
  "compilerOptions": {
    "types": [
+     "./node_modules/telegram-webapps"
    ]
  }
}Use Telegram constant inside your client-side code to get WebApp object:
// informs the Telegram app that the Web App is ready to be displayed
Telegram.WebApp.ready()