import Vnmf from '../../index' declare module '../../index' { namespace stopGyroscope { 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 startGyroscope { 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 /** Performance frequency for listening to gyro data echo functions */ interval?: keyof Interval /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } /** Performance frequency for listening to gyro data echo functions */ interface Interval { /** The echo frequency for updating the game,Yes. 20ms/Number of times Left and right. */ game /** Applies to Updates UI The echo frequency of the,Yes. 60ms/Number of times Left and right. */ ui /** Normal echo frequency,Yes. 200ms/Number of times Left and right. */ normal } } namespace onGyroscopeChange { /** The echo function for gyro data change events */ type Callback = ( result: CallbackResult, ) => void interface CallbackResult { /** x Angular velocity of the axis */ x: number /** y Angular velocity of the axis */ y: number /** z Angular velocity of the axis */ z: number } } interface VnmfStatic { /** Stop listening to gyro data。 * @supported weapp, rn, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/gyroscope/wx.stopGyroscope.html */ stopGyroscope(option?: stopGyroscope.Option): Promise /** Start listening to gyro data.。 * @supported weapp, rn, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/gyroscope/wx.startGyroscope.html */ startGyroscope(option: startGyroscope.Option): Promise /** Listen to gyro data changes。Frequency basis Vnmf.startGyroscope() It's... it's... interval Parameters。You can use it. Vnmf.stopGyroscope() Stop listening.。 * @supported weapp, rn, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/gyroscope/wx.onGyroscopeChange.html */ onGyroscopeChange( /** The echo function for gyro data change events */ callback: onGyroscopeChange.Callback, ): void /** Disable listening to gyro data changes。 * @supported weapp, rn, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/gyroscope/wx.offGyroscopeChange.html */ offGyroscopeChange( /** The echo function for gyro data change events */ callback?: (...args: any[]) => any, ): void } }