summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/db.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2020-11-27 11:23:06 +0100
committerFlorian Dold <florian@dold.me>2020-11-27 11:23:06 +0100
commit0828e65f8845dc4b148c0d3b0697fb589b338239 (patch)
tree800245846e3b28a9dfe89c2893fd0a9bcf47847e /packages/taler-wallet-core/src/db.ts
parent4e481a51c64084db21d3eea513b13a7a3bd6603a (diff)
downloadwallet-core-0828e65f8845dc4b148c0d3b0697fb589b338239.tar.gz
wallet-core-0828e65f8845dc4b148c0d3b0697fb589b338239.tar.bz2
wallet-core-0828e65f8845dc4b148c0d3b0697fb589b338239.zip
fix static types
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r--packages/taler-wallet-core/src/db.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts
index ac3c79e20..ecc5509dc 100644
--- a/packages/taler-wallet-core/src/db.ts
+++ b/packages/taler-wallet-core/src/db.ts
@@ -39,11 +39,11 @@ export function openTalerDatabase(
if (oldVersion === 0) {
for (const n in Stores) {
if ((Stores as any)[n] instanceof Store) {
- const si: Store<any> = (Stores as any)[n];
+ const si: Store<string, any> = (Stores as any)[n];
const s = db.createObjectStore(si.name, si.storeParams);
for (const indexName in si as any) {
if ((si as any)[indexName] instanceof Index) {
- const ii: Index<any, any> = (si as any)[indexName];
+ const ii: Index<string, string, any, any> = (si as any)[indexName];
s.createIndex(ii.indexName, ii.keyPath, ii.options);
}
}
@@ -57,7 +57,7 @@ export function openTalerDatabase(
logger.info(`upgrading database from ${oldVersion} to ${newVersion}`);
for (const n in Stores) {
if ((Stores as any)[n] instanceof Store) {
- const si: Store<any> = (Stores as any)[n];
+ const si: Store<string, any> = (Stores as any)[n];
let s: IDBObjectStore;
if ((si.storeParams?.versionAdded ?? 1) > oldVersion) {
s = db.createObjectStore(si.name, si.storeParams);
@@ -66,7 +66,7 @@ export function openTalerDatabase(
}
for (const indexName in si as any) {
if ((si as any)[indexName] instanceof Index) {
- const ii: Index<any, any> = (si as any)[indexName];
+ const ii: Index<string, string, any, any> = (si as any)[indexName];
if ((ii.options?.versionAdded ?? 0) > oldVersion) {
s.createIndex(ii.indexName, ii.keyPath, ii.options);
}