telegram-webapps
v8.0.0
Published
Typings for Telegram Mini Apps
Downloads
2,625
Maintainers
Readme
Usage
Installation
via npm
:
npm install telegram-webapps --save-dev
via yarn
:
yarn add -D telegram-webapps
via pnpm
:
pnpm add -D telegram-webapps
Use 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()