Skip to content

zakarliuka/tg-webapp-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Web App TypeScript Typings

TypeScript typings for Telegram Web Apps. These typings provide type information for developing applications that interact with Telegram's Web App. For more information on Telegram Web Apps, please visit the official documentation.

Installation

You can install these TypeScript typings via npm:

npm install @zakarliuka/tg-webapp-types

Usage

TypeScript Project

If you are working on a TypeScript project, follow these steps to include the Telegram Web App types in your project:

  1. Make sure you have installed the typings using npm.

  2. Open your tsconfig.json file and update the compilerOptions section to include the path to the type definitions. Add "typeRoots" with an array containing the following paths:

{
  "compilerOptions": {
    // ... other options
   "typeRoots": [
+     "./node_modules/@zakarliuka/tg-webapp-types"
    ]
  }
}

JavaScript Project

For JavaScript projects, you won't have type checking, but you can still improve your autocompletion experience:

  1. Create a jsconfig.json file at the root of your project if you don't already have one.

  2. Add the following configuration to the jsconfig.json file:

{
  "compilerOptions": {
    "typeRoots": [
+      "./node_modules/telegram-webapp-types"
   ]
  }
}

Now, you should have improved autocompletion support for your JavaScript project when working with Telegram Web Apps.

Documentation

For more detailed information on using these typings, please refer to the official Telegram Web Apps documentation.

License

This module is licensed under the [Your License Name] License. See the LICENSE file for details.

Support

If you have any questions or encounter any issues, please feel free to open an issue on our GitHub repository. We'd be happy to assist you.

About

TypeScript typings for Telegram Web Apps for Bots. https://core.telegram.org/bots/webapps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published