@zakarliuka/tg-webapp-types
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

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.

Package Sidebar

Install

npm i @zakarliuka/tg-webapp-types

Weekly Downloads

12

Version

1.0.7

License

MIT

Unpacked Size

26.7 kB

Total Files

4

Last publish

Collaborators

  • zakarliuka