Upgrade to typescript v4.2.2 (#188)

* upgrade to typescript v4.2.2

* prettier; remove outdated test
This commit is contained in:
Xianny
2021-03-30 13:26:05 -07:00
committed by GitHub
parent 525bc8197b
commit 7bf009fbf6
50 changed files with 58 additions and 426 deletions

View File

@@ -84,7 +84,7 @@
"truffle": "^5.0.32",
"tslint": "5.11.0",
"typedoc": "~0.16.11",
"typescript": "3.0.1"
"typescript": "4.2.2"
},
"dependencies": {
"@0x/base-contract": "^6.2.18",

View File

@@ -4,6 +4,7 @@ import { DecodedLogArgs, LogWithDecodedArgs } from 'ethereum-types';
import { constants as stakingConstants } from './constants';
export { Numberish } from '@0x/contracts-test-utils';
// tslint:disable:max-classes-per-file
export interface StakingParams {
@@ -259,5 +260,3 @@ export class AggregatedStats {
export interface AggregatedStatsByEpoch {
[epoch: string]: AggregatedStats;
}
export type Numberish = Numberish;

View File

@@ -12,7 +12,6 @@ import {
blockchainTests.resets('Exchange Unit Tests', env => {
// Addresses
let nonOwner: string;
let owner: string;
let nonExchange: string;
let exchange: string;
@@ -24,7 +23,7 @@ blockchainTests.resets('Exchange Unit Tests', env => {
before(async () => {
// Set up addresses for testing.
[nonOwner, owner, nonExchange, exchange, nonAuthority, authority] = await env.getAccountAddressesAsync();
[, owner, nonExchange, exchange, nonAuthority, authority] = await env.getAccountAddressesAsync();
// Deploy the Exchange Manager contract.
exchangeManager = await TestExchangeManagerContract.deployFrom0xArtifactAsync(

View File

@@ -543,7 +543,7 @@ blockchainTests.resets('Finalizer unit tests', env => {
const expectedPoolRewards = await calculatePoolRewardsAsync(INITIAL_BALANCE, pools);
const [pool, reward] = _.sampleSize(shortZip(pools, expectedPoolRewards), 1)[0];
return assertUnfinalizedPoolRewardsAsync(pool.poolId, {
totalReward: (reward as any) as BigNumber,
totalReward: reward,
membersStake: pool.membersStake,
});
});

View File

@@ -12,17 +12,13 @@ import * as _ from 'lodash';
import { artifacts } from '../artifacts';
import { TestCobbDouglasContract } from '../wrappers';
// tslint:disable: no-unnecessary-type-assertion
blockchainTests('LibCobbDouglas unit tests', env => {
const FUZZ_COUNT = 1024;
const PRECISION = 15;
let testContract: TestCobbDouglasContract;
let ownerAddress: string;
let notOwnerAddress: string;
before(async () => {
[ownerAddress, notOwnerAddress] = await env.getAccountAddressesAsync();
testContract = await TestCobbDouglasContract.deployFrom0xArtifactAsync(
artifacts.TestCobbDouglas,
env.provider,
@@ -211,4 +207,3 @@ blockchainTests('LibCobbDouglas unit tests', env => {
});
});
});
// tslint:enable:no-unnecessary-type-assertion