forked from mystiq/hydrogen-web
use generics here to say return type of method is same as callback
This commit is contained in:
parent
5b9fd5de94
commit
36da02c14e
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ export class Transaction {
|
|||
return new Store(this._txn.objectStore(name), this);
|
||||
}
|
||||
|
||||
_store(name: StoreNames, mapStore: (idbStore: Store<any>) => any): any {
|
||||
_store<T>(name: StoreNames, mapStore: (idbStore: Store<any>) => T): T {
|
||||
if (!this._stores[name]) {
|
||||
const idbStore = this._idbStore(name);
|
||||
this._stores[name] = mapStore(idbStore);
|
||||
|
|
Loading…
Reference in a new issue