diff options
author | Florian Dold <florian@dold.me> | 2020-12-14 16:45:15 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2020-12-14 16:45:15 +0100 |
commit | f332d61fb68fbc394f31337ddeb7d1fc114772d0 (patch) | |
tree | eeb9e7dd527ab7efcaa7812f4440e8901185e9aa /packages/taler-wallet-core/src/util/query.ts | |
parent | c4b44a51097e67a357b490adf407f1a6afb0d8ee (diff) | |
download | wallet-core-f332d61fb68fbc394f31337ddeb7d1fc114772d0.tar.xz |
formatting pass
Diffstat (limited to 'packages/taler-wallet-core/src/util/query.ts')
-rw-r--r-- | packages/taler-wallet-core/src/util/query.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/packages/taler-wallet-core/src/util/query.ts b/packages/taler-wallet-core/src/util/query.ts index beb14cad0..e1a23b168 100644 --- a/packages/taler-wallet-core/src/util/query.ts +++ b/packages/taler-wallet-core/src/util/query.ts @@ -25,7 +25,6 @@ */ import { openPromise } from "./promiseUtils"; import { - IDBObjectStoreParameters, IDBRequest, IDBTransaction, IDBValidKey, @@ -574,7 +573,7 @@ export class Database { async get<N extends string, T>( store: Store<N, T>, - key: any, + key: IDBValidKey, ): Promise<T | undefined> { const tx = this.db.transaction([store.name], "readonly"); const req = tx.objectStore(store.name).get(key); @@ -585,7 +584,7 @@ export class Database { async getIndexed<Ind extends Index<string, string, any, any>>( index: InferIndex<Ind>, - key: any, + key: IDBValidKey, ): Promise<IndexRecord<Ind> | undefined> { const tx = this.db.transaction([index.storeName], "readonly"); const req = tx.objectStore(index.storeName).index(index.indexName).get(key); @@ -597,7 +596,7 @@ export class Database { async put<St extends Store<string, any>>( store: St, value: StoreContent<St>, - key?: any, + key?: IDBValidKey, ): Promise<any> { const tx = this.db.transaction([store.name], "readwrite"); const req = tx.objectStore(store.name).put(value, key); @@ -608,7 +607,7 @@ export class Database { async mutate<N extends string, T>( store: Store<N, T>, - key: any, + key: IDBValidKey, f: (x: T) => T | undefined, ): Promise<void> { const tx = this.db.transaction([store.name], "readwrite"); |