From 994b75af45c23d7a41bb88ddf2a0f657a209f8a5 Mon Sep 17 00:00:00 2001 From: Alex Inkin Date: Tue, 4 Oct 2022 02:55:46 +0300 Subject: [PATCH] feat: remove ionic storage (#51) --- client/lib/patch-db.ts | 4 ++-- client/lib/types.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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> {