@telegram-apps/sdk
Version:
TypeScript Source Development Kit for Telegram Mini Apps client application.
20 lines (19 loc) • 1.24 kB
TypeScript
import { AbortablePromise, PromiseOptions } from 'better-promises';
import { HomeScreenStatus } from '@telegram-apps/bridge';
/**
* Sends a request to the native Telegram application to check if the current mini
* application is added to the device's home screen.
* @param options - additional options.
* @since Mini Apps v8.0
* @throws {ConcurrentCallError} Check home screen status request is currently in progress
* @throws {FunctionNotAvailableError} The environment is unknown
* @throws {FunctionNotAvailableError} The SDK is not initialized
* @throws {FunctionNotAvailableError} The function is not supported
* @example
* if (checkHomeScreenStatus.isAvailable()) {
* const status = await checkHomeScreenStatus();
* }
*/
export declare const checkHomeScreenStatus: import('../../wrappers/wrapSafe.js').SafeWrapped<(options?: PromiseOptions) => AbortablePromise<HomeScreenStatus>, true, never>;
export declare const checkHomeScreenStatusPromise: import('@telegram-apps/signals').Computed<AbortablePromise<string> | undefined>, isCheckingHomeScreenStatus: import('@telegram-apps/signals').Computed<boolean>;
export declare const checkHomeScreenStatusError: import('@telegram-apps/signals').Computed<Error | undefined>;