@twa-dev/types
v8.0.1
Published
Types for Telegram Web Apps (TWA) SDK
Downloads
71,353
Readme
Types
Types for Telegram Web Apps (TWA) SDK.
Installation
npm i @twa-dev/types
Usage Example
import { Telegram } from "@twa-dev/types";
declare global {
interface Window {
Telegram: Telegram;
}
}
window.Telegram.WebApp.HapticFeedback.notificationOccurred("success");
Exported Types
WebAppUser
WebAppChat
WebAppInitData
ThemeParams
HapticFeedback
BackButton
BottomButton
MainButton
SecondaryButton
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