UNPKG

@telegram-apps/sdk

Version:

TypeScript Source Development Kit for Telegram Mini Apps client application.

18 lines (17 loc) 830 B
import { AbortablePromise } from 'better-promises'; import { RequestOptionsNoCapture } from '../../../types.js'; /** * Reads a text from the clipboard and returns a `string` or `null`. `null` is returned * in cases: * - A value in the clipboard is not a text. * - Access to the clipboard is not granted. * @since Mini Apps v6.4 * @throws {FunctionNotAvailableError} The environment is unknown * @throws {FunctionNotAvailableError} The SDK is not initialized * @throws {FunctionNotAvailableError} The function is not supported * @example * if (readTextFromClipboard.isAvailable()) { * const value = await readTextFromClipboard(); * } */ export declare const readTextFromClipboard: import('../../wrappers/wrapSafe.js').SafeWrapped<(options?: RequestOptionsNoCapture) => AbortablePromise<string | null>, true, never>;