Teleforge API Reference - v0.1.0
    Preparing search index...

    Interface UseTelegramReturn

    interface UseTelegramReturn {
        colorScheme: WebAppColorScheme;
        isExpanded: boolean;
        isMock: boolean;
        platform: TelegramPlatform;
        tg: TelegramWebApp | null;
        themeParams: ThemeParams;
        user: WebAppUser | null;
        userUnsafe: WebAppUser | null;
        version: string;
        viewportHeight: number;
        viewportStableHeight: number;
        cloudStorage: CloudStorage;
        close: () => void;
        expand: () => void;
        hapticFeedback: HapticFeedback;
        isReady: boolean;
        openLink: (url: string, options?: { try_instant_view?: boolean }) => void;
        openTelegramLink: (url: string) => void;
        ready: () => void;
        sendData: (data: string) => void;
        showAlert: (message: string, callback?: () => void) => void;
        showConfirm: (
            message: string,
            callback?: (confirmed: boolean) => void,
        ) => void;
        showPopup: (params: PopupParams, callback?: (id?: string) => void) => void;
    }

    Hierarchy

    • TelegramSnapshot
      • UseTelegramReturn
    Index

    Properties

    colorScheme: WebAppColorScheme
    isExpanded: boolean
    isMock: boolean
    tg: TelegramWebApp | null
    themeParams: ThemeParams
    user: WebAppUser | null
    userUnsafe: WebAppUser | null
    version: string
    viewportHeight: number
    viewportStableHeight: number
    cloudStorage: CloudStorage
    close: () => void
    expand: () => void
    hapticFeedback: HapticFeedback
    isReady: boolean
    openLink: (url: string, options?: { try_instant_view?: boolean }) => void
    openTelegramLink: (url: string) => void
    ready: () => void
    sendData: (data: string) => void
    showAlert: (message: string, callback?: () => void) => void
    showConfirm: (message: string, callback?: (confirmed: boolean) => void) => void
    showPopup: (params: PopupParams, callback?: (id?: string) => void) => void