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'
1010export { MutationCache } from './mutationCache'
1111export type { MutationCacheNotifyEvent } from './mutationCache'
1212export { MutationObserver } from './mutationObserver'
13- export { notifyManager } from './notifyManager'
13+ export { notifyManager , defaultScheduler } from './notifyManager'
1414export { focusManager } from './focusManager'
1515export { onlineManager } from './onlineManager'
1616export {
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ type BatchCallsCallback<T extends Array<unknown>> = (...args: T) => void
1010
1111type ScheduleFunction = ( callback : ( ) => void ) => void
1212
13+ export const defaultScheduler : ScheduleFunction = ( cb ) => setTimeout ( cb , 0 )
14+
1315export function createNotifyManager ( ) {
1416 let queue : Array < NotifyCallback > = [ ]
1517 let transactions = 0
@@ -19,7 +21,7 @@ export function createNotifyManager() {
1921 let batchNotifyFn : BatchNotifyFunction = ( callback : ( ) => void ) => {
2022 callback ( )
2123 }
22- let scheduleFn : ScheduleFunction = ( cb ) => setTimeout ( cb , 0 )
24+ let scheduleFn = defaultScheduler
2325
2426 const schedule = ( callback : NotifyCallback ) : void => {
2527 if ( transactions ) {
You can’t perform that action at this time.
0 commit comments