Types for Telegram Web Apps (TWA) SDK.
npm i @twa-dev/types
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
MainButton
SecondaryButton
SettingsButton
EventNames
EventParams
PopupParams
PopupButton
WebApp
ScanQrPopupParams
CloudStorage
BiometricManager
BiometricRequestAccessParams
BiometricAuthenticateParams
StoryShareParams
StoryWidgetLink
Platforms