diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-08-09 05:12:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-09 05:12:18 +0800 |
commit | 13f0d27f7cf6fadacc01d013305975ce44af4482 (patch) | |
tree | 1089536b29731a2c24290c754eb318ec7f5cb6b2 /packages/contracts | |
parent | a6ccfaf9caf20cbc4969c0673cf0c83c33553e0a (diff) | |
parent | 6e2e658162a5a128b722ba105f92fa5267c4bd62 (diff) | |
download | dexon-sol-tools-13f0d27f7cf6fadacc01d013305975ce44af4482.tar.gz dexon-sol-tools-13f0d27f7cf6fadacc01d013305975ce44af4482.tar.zst dexon-sol-tools-13f0d27f7cf6fadacc01d013305975ce44af4482.zip |
Merge pull request #945 from 0xProject/fix/typescript-2.9.2
Update TypeScript to version 2.9.2
Diffstat (limited to 'packages/contracts')
-rw-r--r-- | packages/contracts/package.json | 2 | ||||
-rw-r--r-- | packages/contracts/test/exchange/match_orders.ts | 23 |
2 files changed, 20 insertions, 5 deletions
diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 014210d33..1f5c15674 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -68,7 +68,7 @@ "solc": "^0.4.24", "solhint": "^1.2.1", "tslint": "5.11.0", - "typescript": "2.7.1", + "typescript": "2.9.2", "yargs": "^10.0.3" }, "dependencies": { diff --git a/packages/contracts/test/exchange/match_orders.ts b/packages/contracts/test/exchange/match_orders.ts index 440097562..46b3569bd 100644 --- a/packages/contracts/test/exchange/match_orders.ts +++ b/packages/contracts/test/exchange/match_orders.ts @@ -69,13 +69,22 @@ describe('matchOrders', () => { before(async () => { // Create accounts const accounts = await web3Wrapper.getAvailableAddressesAsync(); + // Hack(albrow): Both Prettier and TSLint insert a trailing comma below + // but that is invalid syntax as of TypeScript version >= 2.8. We don't + // have the right fine-grained configuration options in TSLint, + // Prettier, or TypeScript, to reconcile this, so we will just have to + // wait for them to sort it out. We disable TSLint and Prettier for + // this part of the code for now. This occurs several times in this + // file. See https://github.com/prettier/prettier/issues/4624. + // prettier-ignore const usedAddresses = ([ owner, makerAddressLeft, makerAddressRight, takerAddress, feeRecipientAddressLeft, - feeRecipientAddressRight, + // tslint:disable-next-line:trailing-comma + feeRecipientAddressRight ] = _.slice(accounts, 0, 6)); // Create wrappers erc20Wrapper = new ERC20Wrapper(provider, usedAddresses, owner); @@ -201,9 +210,11 @@ describe('matchOrders', () => { // Match signedOrderLeft with signedOrderRight let newERC20BalancesByOwner: ERC20BalancesByOwner; let newERC721TokenIdsByOwner: ERC721TokenIdsByOwner; + // prettier-ignore [ newERC20BalancesByOwner, - newERC721TokenIdsByOwner, + // tslint:disable-next-line:trailing-comma + newERC721TokenIdsByOwner ] = await matchOrderTester.matchOrdersAndVerifyBalancesAsync( signedOrderLeft, signedOrderRight, @@ -306,9 +317,11 @@ describe('matchOrders', () => { // Match orders let newERC20BalancesByOwner: ERC20BalancesByOwner; let newERC721TokenIdsByOwner: ERC721TokenIdsByOwner; + // prettier-ignore [ newERC20BalancesByOwner, - newERC721TokenIdsByOwner, + // tslint:disable-next-line:trailing-comma + newERC721TokenIdsByOwner ] = await matchOrderTester.matchOrdersAndVerifyBalancesAsync( signedOrderLeft, signedOrderRight, @@ -374,9 +387,11 @@ describe('matchOrders', () => { // Match orders let newERC20BalancesByOwner: ERC20BalancesByOwner; let newERC721TokenIdsByOwner: ERC721TokenIdsByOwner; + // prettier-ignore [ newERC20BalancesByOwner, - newERC721TokenIdsByOwner, + // tslint:disable-next-line:trailing-comma + newERC721TokenIdsByOwner ] = await matchOrderTester.matchOrdersAndVerifyBalancesAsync( signedOrderLeft, signedOrderRight, |