import Vnmf from '../../index' declare module '../../index' { namespace setClipboardData { interface Promised extends VnmfGeneral.CallbackResult { /** Call Information */ errMsg: string /** Clipboard Contents */ data: string } interface Option { /** Clipboard Contents */ data: string /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } } namespace getClipboardData { interface Promised extends VnmfGeneral.CallbackResult { /** Call Information */ errMsg: string /** Clipboard Contents */ data: string } interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: SuccessCallbackOption) => void } interface SuccessCallbackOption { /** Clipboard Contents */ data: string } } interface VnmfStatic { /** Set the contents of system clipboard。After Call Successful,It pops. toast Hint"Content Copyed",Ongoing 1.5s * @supported weapp, h5, rn, tt * @h5 Partially achieved * @example * ```tsx * Vnmf.setClipboardData({ * data: 'data', * success: function (res) { * Vnmf.getClipboardData({ * success: function (res) { * console.log(res.data) // data * } * }) * } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/clipboard/wx.setClipboardData.html */ setClipboardData(option: setClipboardData.Option): Promise /** * Fetch System Clipboard Contents * @supported weapp, h5, rn, tt * @h5 Partially achieved * @example * ```tsx * Vnmf.getClipboardData({ * success: function (res){ * console.log(res.data) * } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/clipboard/wx.getClipboardData.html */ getClipboardData(res?: getClipboardData.Option): Promise } }