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

1.0.2 • Public • Published

@tg-app/types

Telegram Mini App type definitions.

Install

npm i -S @tg-app/types
# or
yarn add @tg-app/types

Usage

Direct import

import { Telegram } from '@tg-app/types'

function closeApp(app: Telegram.WebApp) {
  app.close()
}

Define globals

import '@tg-app/types/global'

function closeApp() {
  window.Telegram?.WebApp.close()
}

Readme

Keywords

none

Package Sidebar

Install

npm i @tg-app/types

Weekly Downloads

1

Version

1.0.2

License

none

Unpacked Size

61.2 kB

Total Files

17

Last publish

Collaborators

  • bigslycat