@@ -77,20 +77,20 @@ export default class SyncManager<
77
77
ItemType extends BaseItem < IdType > = BaseItem ,
78
78
IdType = any ,
79
79
> {
80
- private options : Options < CollectionOptions , ItemType , IdType >
81
- private collections : Map < string , [
80
+ protected options : Options < CollectionOptions , ItemType , IdType >
81
+ protected collections : Map < string , [
82
82
Collection < ItemType , IdType , any > ,
83
83
SyncOptions < CollectionOptions > ,
84
84
] > = new Map ( )
85
85
86
- private changes : Collection < Change < ItemType > , string >
87
- private snapshots : Collection < Snapshot < ItemType > , string >
88
- private syncOperations : Collection < SyncOperation , string >
89
- private remoteChanges : Collection < Change , string >
90
- private syncQueues : Map < string , PromiseQueue > = new Map ( )
91
- private persistenceReady : Promise < void >
92
- private isDisposed = false
93
- private instanceId = randomId ( )
86
+ protected changes : Collection < Change < ItemType > , string >
87
+ protected snapshots : Collection < Snapshot < ItemType > , string >
88
+ protected syncOperations : Collection < SyncOperation , string >
89
+ protected remoteChanges : Collection < Change , string >
90
+ protected syncQueues : Map < string , PromiseQueue > = new Map ( )
91
+ protected persistenceReady : Promise < void >
92
+ protected isDisposed = false
93
+ protected instanceId = randomId ( )
94
94
95
95
/**
96
96
* @param options Collection options
@@ -172,7 +172,7 @@ export default class SyncManager<
172
172
this . syncOperations . setMaxListeners ( 1000 )
173
173
}
174
174
175
- private getSyncQueue ( name : string ) {
175
+ protected getSyncQueue ( name : string ) {
176
176
if ( this . syncQueues . get ( name ) == null ) {
177
177
this . syncQueues . set ( name , new PromiseQueue ( ) )
178
178
}
@@ -303,11 +303,11 @@ export default class SyncManager<
303
303
} )
304
304
}
305
305
306
- private deboucedPush = debounce ( ( name : string ) => {
306
+ protected deboucedPush = debounce ( ( name : string ) => {
307
307
this . pushChanges ( name ) . catch ( ( ) => { /* error handler is called in sync */ } )
308
308
} , 100 )
309
309
310
- private schedulePush ( name : string ) {
310
+ protected schedulePush ( name : string ) {
311
311
this . deboucedPush ( name )
312
312
}
313
313
@@ -434,7 +434,7 @@ export default class SyncManager<
434
434
} )
435
435
}
436
436
437
- private async syncWithData (
437
+ protected async syncWithData (
438
438
name : string ,
439
439
data : LoadResponse < ItemType > ,
440
440
) {
0 commit comments