import Vnmf from '../../index' declare module '../../index' { namespace getBatteryInfoSync { interface Result { /** Whether to be charging */ isCharging: boolean /** Equipment ,scope 1 - 100 */ level: string } } namespace getBatteryInfo { interface Option { /** The callback function of the interface call (Call success 、Failure will be executed ) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failure recovery function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface call successful callback function */ success?: (res: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.CallbackResult { /** Whether to be charging */ isCharging: boolean /** Equipment ,scope 1 - 100 */ level: number /** Call result */ errMsg: string } } interface VnmfStatic { /** Vnmf.getBatteryInfo Synchronous version * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/battery/wx.getBatteryInfoSync.html */ getBatteryInfoSync(): getBatteryInfoSync.Result /** Get equipment electricity 。Synchronize API Vnmf.getBatteryInfoSync exist iOS Unavailable 。 * @supported weapp, h5 * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/battery/wx.getBatteryInfo.html */ getBatteryInfo(option?: getBatteryInfo.Option): Promise } }