diff --git a/client/lib/patch-db.ts b/client/lib/patch-db.ts index 75bb3dc..62ccb22 100644 --- a/client/lib/patch-db.ts +++ b/client/lib/patch-db.ts @@ -31,10 +31,10 @@ export class PatchDB { constructor(private readonly source$: Observable[]>) {} - async start(bootstrapper: Bootstrapper) { + start(bootstrapper: Bootstrapper) { if (this.sub) return - const initialCache = await bootstrapper.init() + const initialCache = bootstrapper.init() this.cache$.next(initialCache) this.sub = this.source$ diff --git a/client/lib/types.ts b/client/lib/types.ts index cb4ece6..63a8284 100644 --- a/client/lib/types.ts +++ b/client/lib/types.ts @@ -18,8 +18,8 @@ export enum PatchOp { } export interface Bootstrapper { - init(): Promise> - update(cache: DBCache): Promise + init(): DBCache + update(cache: DBCache): void } export interface DBCache> {