From 885285734733b71c88dfb0da513988eb8678aa14 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 12 Sep 2016 20:25:56 +0200 Subject: fix compiler warnings --- lib/wallet/cryptoApi.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/wallet/cryptoApi.ts') 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(methodName: string, ...args): Promise { + private doRpc(methodName: string, ...args: any[]): Promise { return new Promise((resolve, reject) => { let msg = { operation: methodName, -- cgit v1.2.3