@telegram-apps/sdk
Version:
TypeScript Source Development Kit for Telegram Mini Apps client application.
16 lines (15 loc) • 633 B
TypeScript
/**
* Opens a Telegram link inside the Telegram app. The function expects passing a link in a full
* format using the hostname "t.me".
*
* The Mini App will be closed.
* @param url - URL to be opened.
* @throws {FunctionNotAvailableError} The environment is unknown
* @throws {FunctionNotAvailableError} The SDK is not initialized
* @throws {InvalidArgumentsError} Invalid URL passed
* @example
* if (openTelegramLink.isAvailable()) {
* openTelegramLink('https://t.me/heyqbnk');
* }
*/
export declare const openTelegramLink: import('../../wrappers/wrapSafe.js').SafeWrapped<(url: string | URL) => void, false, never>;