import Vnmf from '../../index' declare module '../../index' { interface VnmfStatic { /** Delay some of the operation until next timer.。(Kind of. setTimeout) * * **Annotations** * Because it's a custom component. setData and triggerEvent Waiting for the interface itself to be a synchronous operation,When these interfaces are called on a continuous basis,,It's all done in a synchronized process.,So if logic doesn't work out, it could lead to a mistake.。 * An extreme case.:A parent component. setData It triggers the subcomponents. triggerEvent,And then the father's component went on to do it again. setData,There's a passage in time. wx:if Statement Unmount Subcomponents,It could cause a strange mistake.,So for logic that doesn't need to be done in a synchronized process,,You can use this interface to delay execution the next timer.。 * @supported weapp, h5 * @example * ```tsx * this.setData({ number: 1 }) // Execute directly in the current synchronisation process * Vnmf.nextTick(() => { * this.setData({ number: 3 }) // After Current Synchronization Process,Next Time Script Implementation * }) * this.setData({ number: 2 }) // Execute directly in the current synchronisation process * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/custom-component/wx.nextTick.html */ nextTick(callback: (...args: any[]) => any): void } }