import Vnmf from '../../index' declare module '../../index' { namespace hideKeyboard { 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: VnmfGeneral.CallbackResult) => void } } namespace getSelectedTextRange { 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?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.CallbackResult { /** Enter the end of box cursor */ end: number /** Enter the starting position of box cursor */ start: number /** Call Results */ errMsg: string } } namespace onKeyboardHeightChange { type Callback = ( result: CallbackResult, ) => void interface CallbackResult { /** Keyboard height */ height: number } } interface VnmfStatic { /** Yes.input、textareaWait.focusWhen you pull up the keyboard,,Manually call this interface to close the keyboard * @supported weapp, rn, tt * @example * ```tsx * Vnmf.hideKeyboard({ * complete: res => { * console.log('hideKeyboard res', res) * } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/keyboard/wx.hideKeyboard.html */ hideKeyboard(option?: hideKeyboard.Option): Promise /** Yes.input、textareaWait.focusAfter,Get the cursor position of input box。Attention.:OnlyfocusCall this interface when you want it to work.。 * @supported weapp * @example * ```tsx * Vnmf.getSelectedTextRange({ * complete: res => { * console.log('getSelectedTextRange res', res.start, res.end) * } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/keyboard/wx.getSelectedTextRange.html */ getSelectedTextRange(option?: getSelectedTextRange.Option): Promise /** Listen to keyboard height changes * @supported weapp, rn * @example * ```tsx * Vnmf.onKeyboardHeightChange(res => { * console.log(res.height) * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/keyboard/wx.onKeyboardHeightChange.html */ onKeyboardHeightChange(callback: onKeyboardHeightChange.Callback): void /** * Disable listening to keyboard height changes。 * @supported weapp, rn * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/keyboard/wx.offKeyboardHeightChange.html */ offKeyboardHeightChange( /** The keyboard height change event echo function */ callback?: (...args: any[]) => any, ): void } }