Skip to content

Commit cd85d1a

Browse files
committed
Make SyncEngine an interface such that SyncEngineImpl can be contained in the module.
1 parent 1791a9b commit cd85d1a

File tree

2 files changed

+244
-110
lines changed

2 files changed

+244
-110
lines changed

packages/firestore/src/core/component_provider.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ import {
2727
newLocalStore,
2828
newMultiTabLocalStore
2929
} from '../local/local_store';
30-
import { MultiTabSyncEngine, SyncEngine } from './sync_engine';
30+
import {
31+
MultiTabSyncEngine,
32+
newMultiTabSyncEngine,
33+
newSyncEngine,
34+
SyncEngine
35+
} from './sync_engine';
3136
import { RemoteStore } from '../remote/remote_store';
3237
import { EventManager } from './event_manager';
3338
import { AsyncQueue } from '../util/async_queue';
@@ -167,7 +172,7 @@ export class MemoryComponentProvider implements ComponentProvider {
167172
}
168173

169174
createSyncEngine(cfg: ComponentConfiguration): SyncEngine {
170-
return new SyncEngine(
175+
return newSyncEngine(
171176
this.localStore,
172177
this.remoteStore,
173178
cfg.datastore,
@@ -225,7 +230,7 @@ export class IndexedDbComponentProvider extends MemoryComponentProvider {
225230
}
226231

227232
createSyncEngine(cfg: ComponentConfiguration): SyncEngine {
228-
const syncEngine = new MultiTabSyncEngine(
233+
const syncEngine = newMultiTabSyncEngine(
229234
this.localStore,
230235
this.remoteStore,
231236
cfg.datastore,

0 commit comments

Comments
 (0)