From 27d9fba785a5a53550be53b12baf9069bda8d160 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 4 Jan 2018 18:56:30 +0100 Subject: Include web3 types via typeRoots and factor out common parts of tsconfig.json --- packages/contracts/deploy/src/utils/contract.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/contracts/deploy/src') diff --git a/packages/contracts/deploy/src/utils/contract.ts b/packages/contracts/deploy/src/utils/contract.ts index 2c8bbb79e..546e82dfb 100644 --- a/packages/contracts/deploy/src/utils/contract.ts +++ b/packages/contracts/deploy/src/utils/contract.ts @@ -24,7 +24,7 @@ export class Contract implements Web3.ContractInstance { this._validator = new SchemaValidator(); } private _populateFunctions(): void { - const functionsAbi = _.filter(this.abi, abiPart => abiPart.type === AbiType.Function); + const functionsAbi = _.filter(this.abi, abiPart => abiPart.type === AbiType.Function) as Web3.FunctionAbi[]; _.forEach(functionsAbi, (functionAbi: Web3.MethodAbi) => { if (functionAbi.constant) { const cbStyleCallFunction = this._contract[functionAbi.name].call; @@ -42,7 +42,7 @@ export class Contract implements Web3.ContractInstance { }); } private _populateEvents(): void { - const eventsAbi = _.filter(this.abi, abiPart => abiPart.type === AbiType.Event); + const eventsAbi = _.filter(this.abi, abiPart => abiPart.type === AbiType.Event) as Web3.EventAbi[]; _.forEach(eventsAbi, (eventAbi: Web3.EventAbi) => { this[eventAbi.name] = this._contract[eventAbi.name]; }); -- cgit