diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-09-12 20:25:56 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-09-12 20:25:56 +0200 |
commit | 885285734733b71c88dfb0da513988eb8678aa14 (patch) | |
tree | dcaa19022de33210a97266fcb7a91055ea8e42c7 /lib/wallet/db.ts | |
parent | e3cc9c59bcc36eee8c3234574cfdfda3f5eea658 (diff) | |
download | wallet-core-885285734733b71c88dfb0da513988eb8678aa14.tar.xz |
fix compiler warnings
Diffstat (limited to 'lib/wallet/db.ts')
-rw-r--r-- | lib/wallet/db.ts | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/wallet/db.ts b/lib/wallet/db.ts index 6cd25ee27..7fe635b9e 100644 --- a/lib/wallet/db.ts +++ b/lib/wallet/db.ts @@ -15,6 +15,7 @@ */ "use strict"; +import Dictionary = _.Dictionary; /** * Declarations and helpers for @@ -83,27 +84,27 @@ export function openTalerDb(): Promise<IDBDatabase> { } -export function exportDb(db): Promise<any> { +export function exportDb(db: IDBDatabase): Promise<any> { let dump = { name: db.name, version: db.version, - stores: {} + stores: {} as Dictionary<any>, }; return new Promise((resolve, reject) => { let tx = db.transaction(db.objectStoreNames); - tx.addEventListener("complete", (e) => { + tx.addEventListener("complete", () => { resolve(dump); }); for (let i = 0; i < db.objectStoreNames.length; i++) { let name = db.objectStoreNames[i]; - let storeDump = {}; + let storeDump = {} as Dictionary<any>; dump.stores[name] = storeDump; let store = tx.objectStore(name) .openCursor() - .addEventListener("success", (e) => { - let cursor = e.target.result; + .addEventListener("success", (e: Event) => { + let cursor = (e.target as any).result; if (cursor) { storeDump[cursor.key] = cursor.value; cursor.continue(); |