Types for Telegram Web Apps (TWA) SDK
npm install @twa-dev/types
Types for Telegram Web Apps (TWA) SDK.
```
npm i @twa-dev/types
`ts
import { Telegram } from "@twa-dev/types";
declare global {
interface Window {
Telegram: Telegram;
}
}
window.Telegram.WebApp.HapticFeedback.notificationOccurred("success");
`
- WebAppUser
- WebAppChat
- WebAppInitData
- ThemeParams
- HapticFeedback
- BackButton
- BottomButton
- MainButtonSecondaryButton
- SettingsButton
- EventNames
- EventParams
- PopupParams
- PopupButton
- WebApp
- ScanQrPopupParams
- CloudStorage
- BiometricManager
- BiometricRequestAccessParams
- BiometricAuthenticateParams
- StoryShareParams
- StoryWidgetLink
- Accelerometer
- DeviceOrientation
- DeviceOrientationStartParams
- Gyroscope
- GyroscopeStartParams
- LocationManager
- LocationData
- SafeAreaInset
- ContentSafeAreaInset
- EmojiStatusParams
- DownloadFileParams
- Platforms`
-