declare function copyText(text: string): void; /** * Save image to clipboard via javascript. * * CAVEATS: * 1. Typescript have no type definition of navigator.clipboard.write and ClipboardItem yet * 2. Compatibility: * - png only, need extra transformation via canvas if image format is jpg * - supported by chrome 76 and safari 13.1 * 3. Need another request to fetch image * * references: * - https://github.com/Microsoft/TypeScript/issues/26728 * - https://developer.mozilla.org/zh-CN/docs/Web/API/ClipboardItem * - https://github.com/lgarron/clipboard-polyfill */ declare function copyImage(base64Image: string): Promise; export declare const Clipboard: Readonly<{ copyText: typeof copyText; copyImage: typeof copyImage; }>; export {};