From e69ba75849778b57f5e11c93901e9fb4f5e3ed84 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 11 Jan 2024 17:17:38 +0000 Subject: [PATCH] Fixing typing for performCall. --- packages/backend-core/src/db/couch/DatabaseImpl.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend-core/src/db/couch/DatabaseImpl.ts b/packages/backend-core/src/db/couch/DatabaseImpl.ts index 3d55981c4e..0e2b4173b0 100644 --- a/packages/backend-core/src/db/couch/DatabaseImpl.ts +++ b/packages/backend-core/src/db/couch/DatabaseImpl.ts @@ -33,7 +33,7 @@ function buildNano(couchInfo: { url: string; cookie: string }) { }) } -type DBCall = () => Promise +type DBCall = () => Promise export function DatabaseWithConnection( dbName: string, @@ -107,8 +107,8 @@ export class DatabaseImpl implements Database { } // this function fetches the DB and handles if DB creation is needed - private async performCall( - call: (db: Nano.DocumentScope) => Promise | DBCall + private async performCall( + call: (db: Nano.DocumentScope) => Promise> | DBCall ): Promise { const db = this.getDb() const fnc = await call(db)