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/cryptoApi.ts | |
parent | e3cc9c59bcc36eee8c3234574cfdfda3f5eea658 (diff) | |
download | wallet-core-885285734733b71c88dfb0da513988eb8678aa14.tar.xz |
fix compiler warnings
Diffstat (limited to 'lib/wallet/cryptoApi.ts')
-rw-r--r-- | lib/wallet/cryptoApi.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/wallet/cryptoApi.ts b/lib/wallet/cryptoApi.ts index a0113b2ea..2a2a7d319 100644 --- a/lib/wallet/cryptoApi.ts +++ b/lib/wallet/cryptoApi.ts @@ -27,9 +27,10 @@ import {Denomination} from "./types"; import {Offer} from "./wallet"; import {CoinWithDenom} from "./wallet"; import {PayCoinInfo} from "./types"; +type RegistryEntry = {resolve: any; reject: any}; export class CryptoApi { private nextRpcId: number = 1; - private rpcRegistry = {}; + private rpcRegistry: {[n: number]: RegistryEntry} = {}; private cryptoWorker: Worker; @@ -52,14 +53,14 @@ export class CryptoApi { } - private registerRpcId(resolve, reject): number { + private registerRpcId(resolve: any, reject: any): number { let id = this.nextRpcId++; this.rpcRegistry[id] = {resolve, reject}; return id; } - private doRpc<T>(methodName: string, ...args): Promise<T> { + private doRpc<T>(methodName: string, ...args: any[]): Promise<T> { return new Promise<T>((resolve, reject) => { let msg = { operation: methodName, |