From 4252297f599496a5ee2fd407149133cd35a91e6a Mon Sep 17 00:00:00 2001 From: waterplea Date: Wed, 28 Sep 2022 11:55:54 +0300 Subject: [PATCH] feat: remove ionic storage --- 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> {