File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export { InfiniteQueryObserver } from './infiniteQueryObserver'
10
10
export { MutationCache } from './mutationCache'
11
11
export type { MutationCacheNotifyEvent } from './mutationCache'
12
12
export { MutationObserver } from './mutationObserver'
13
- export { notifyManager } from './notifyManager'
13
+ export { notifyManager , defaultScheduler } from './notifyManager'
14
14
export { focusManager } from './focusManager'
15
15
export { onlineManager } from './onlineManager'
16
16
export {
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ type BatchCallsCallback<T extends Array<unknown>> = (...args: T) => void
10
10
11
11
type ScheduleFunction = ( callback : ( ) => void ) => void
12
12
13
+ export const defaultScheduler : ScheduleFunction = ( cb ) => setTimeout ( cb , 0 )
14
+
13
15
export function createNotifyManager ( ) {
14
16
let queue : Array < NotifyCallback > = [ ]
15
17
let transactions = 0
@@ -19,7 +21,7 @@ export function createNotifyManager() {
19
21
let batchNotifyFn : BatchNotifyFunction = ( callback : ( ) => void ) => {
20
22
callback ( )
21
23
}
22
- let scheduleFn : ScheduleFunction = ( cb ) => setTimeout ( cb , 0 )
24
+ let scheduleFn = defaultScheduler
23
25
24
26
const schedule = ( callback : NotifyCallback ) : void => {
25
27
if ( transactions ) {
You can’t perform that action at this time.
0 commit comments