( this: T, fn?: (this: T) => R | Promise<R>, )
| 59 | fn: (this: T) => R | Promise<R>, |
| 60 | ): Promise<R> |
| 61 | export function nextTick<T, R>( |
| 62 | this: T, |
| 63 | fn?: (this: T) => R | Promise<R>, |
| 64 | ): Promise<void | R> { |
| 65 | const p = currentFlushPromise || resolvedPromise |
| 66 | return fn ? p.then(this ? fn.bind(this) : fn) : p |
| 67 | } |
| 68 | |
| 69 | class="cm">// Use binary-search to find a suitable position in the queue. The queue needs |
| 70 | class="cm">// to be sorted in increasing order of the job ids. This ensures that: |
no outgoing calls