diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-01-05 01:56:30 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-01-10 18:24:31 +0800 |
commit | 27d9fba785a5a53550be53b12baf9069bda8d160 (patch) | |
tree | bde34d668e53832dd03dd279992721d56291124b /packages/contracts | |
parent | e6a783aff803c276392efec93571d24fc96feb6e (diff) | |
download | dexon-sol-tools-27d9fba785a5a53550be53b12baf9069bda8d160.tar dexon-sol-tools-27d9fba785a5a53550be53b12baf9069bda8d160.tar.gz dexon-sol-tools-27d9fba785a5a53550be53b12baf9069bda8d160.tar.bz2 dexon-sol-tools-27d9fba785a5a53550be53b12baf9069bda8d160.tar.lz dexon-sol-tools-27d9fba785a5a53550be53b12baf9069bda8d160.tar.xz dexon-sol-tools-27d9fba785a5a53550be53b12baf9069bda8d160.tar.zst dexon-sol-tools-27d9fba785a5a53550be53b12baf9069bda8d160.zip |
Include web3 types via typeRoots and factor out common parts of tsconfig.json
Diffstat (limited to 'packages/contracts')
-rw-r--r-- | packages/contracts/deploy/solc/bin_paths.ts | 2 | ||||
-rw-r--r-- | packages/contracts/deploy/src/utils/contract.ts | 4 | ||||
-rw-r--r-- | packages/contracts/package.json | 2 | ||||
-rw-r--r-- | packages/contracts/tsconfig.json | 11 |
4 files changed, 9 insertions, 10 deletions
diff --git a/packages/contracts/deploy/solc/bin_paths.ts b/packages/contracts/deploy/solc/bin_paths.ts index a2d345bd7..e5b107101 100644 --- a/packages/contracts/deploy/solc/bin_paths.ts +++ b/packages/contracts/deploy/solc/bin_paths.ts @@ -1,4 +1,4 @@ -interface BinaryPaths { +export interface BinaryPaths { [key: string]: string; } 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]; }); diff --git a/packages/contracts/package.json b/packages/contracts/package.json index d5bd78fc2..41a7756da 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -52,7 +52,7 @@ "types-bn": "^0.0.1", "types-ethereumjs-util": "0xProject/types-ethereumjs-util", "typescript": "~2.6.1", - "web3-typescript-typings": "^0.7.2", + "web3-typescript-typings": "^0.9.0", "yargs": "^10.0.3" }, "dependencies": { diff --git a/packages/contracts/tsconfig.json b/packages/contracts/tsconfig.json index cbcd8ad6d..b3ab06b0d 100644 --- a/packages/contracts/tsconfig.json +++ b/packages/contracts/tsconfig.json @@ -1,16 +1,15 @@ { + "extends": "../../tsconfig", "compilerOptions": { - "outDir": "./lib/", - "sourceMap": true, - "noImplicitAny": true, - "module": "commonjs", - "target": "es6", + "outDir": "lib", "baseUrl": ".", + "declaration": false, + "strictNullChecks": false, + "strictFunctionTypes": false, "allowJs": true }, "include": [ "../../node_modules/types-ethereumjs-util/index.d.ts", - "../../node_modules/web3-typescript-typings/index.d.ts", "../../node_modules/chai-typescript-typings/index.d.ts", "../../node_modules/chai-as-promised-typescript-typings/index.d.ts", "../../node_modules/types-ethereumjs-util/index.d.ts", |