From 36da02c14ec57383b0047e35a5accd41d10c35bd Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 6 Sep 2021 13:01:32 +0200 Subject: [PATCH] use generics here to say return type of method is same as callback --- src/matrix/storage/idb/Transaction.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/storage/idb/Transaction.ts b/src/matrix/storage/idb/Transaction.ts index 73dfb7b3..ea21b745 100644 --- a/src/matrix/storage/idb/Transaction.ts +++ b/src/matrix/storage/idb/Transaction.ts @@ -57,7 +57,7 @@ export class Transaction { return new Store(this._txn.objectStore(name), this); } - _store(name: StoreNames, mapStore: (idbStore: Store) => any): any { + _store(name: StoreNames, mapStore: (idbStore: Store) => T): T { if (!this._stores[name]) { const idbStore = this._idbStore(name); this._stores[name] = mapStore(idbStore);