MCPcopy
hub / github.com/vuejs/core / nextTick

Function nextTick

packages/runtime-core/src/scheduler.ts:61–67  ·  packages/runtime-core/src/scheduler.ts::nextTick
(
  this: T,
  fn?: (this: T) => R | Promise<R>,
)

Source from the content-addressed store, hash-verified

59 fn: (this: T) => R | Promise<R>,
60): Promise<R>
61export 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
69class="cm">// Use binary-search to find a suitable position in the queue. The queue needs
70class="cm">// to be sorted in increasing order of the job ids. This ensures that:

Callers 15

global.spec.tsFile · 0.90
runTestFunction · 0.90
runTestWithModifierFunction · 0.90
misc.spec.tsFile · 0.90
options.spec.tsFile · 0.90
compiler.spec.tsFile · 0.90
disconnectedCallbackMethod · 0.90
createdFunction · 0.90
patchProps.spec.tsFile · 0.90

Calls

no outgoing calls

Tested by 15

runTestFunction · 0.72
runTestWithModifierFunction · 0.72
assertCssVarsFunction · 0.40
setupFunction · 0.40
setupFunction · 0.40
setupFunction · 0.40
runSharedTestsFunction · 0.40
testToggleOnOffFunction · 0.40
testToggleBranchesFunction · 0.40
testOutInFunction · 0.40