TypeScript typings for Telegram Web Apps for Bots. See https://core.telegram.org/bots/webapps
npm install telegram-webapps-types-newnpm
npm install telegram-webapps-types-new
`
$3
Include the types file inside your tsconfig.json
file like this:
`diff
{
"compilerOptions": {
+ "typeRoots": [
+ "./node_modules/@types",
+ "./node_modules/telegram-webapps-types-new"
+ ]
}
}
`
$3
> This step does not add types to your project, but it improves your autocompletion experience. This typically works
> with all modern editors & IDEs. If you encounter an issue, check the documentation for your editor.
1. Create the jsconfig.json file at the root of your project.
2. Add the following
`json
{
"compilerOptions": {
"typeRoots": [
"./node_modules/@types",
"./node_modules/telegram-webapps-types-new"
]
}
}
``