MCPcopy Create free account
hub / github.com/TanStack/query / flush

Function flush

packages/query-core/src/notifyManager.ts:37–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35 }
36 }
37 const flush = (): void => {
38 const originalQueue = queue
39 queue = []
40 if (originalQueue.length) {
41 scheduleFn(() => {
42 batchNotifyFn(() => {
43 originalQueue.forEach((callback) => {
44 notifyFn(callback)
45 })
46 })
47 })
48 }
49 }
50
51 return {
52 batch: <T>(callback: () => T): T => {

Callers 1

createNotifyManagerFunction · 0.85

Calls 2

batchNotifyFnFunction · 0.85
notifyFnFunction · 0.85

Tested by

no test coverage detected