Skip to content

Commit

Permalink
chore: update to TypeScript 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Faust committed Nov 8, 2019
1 parent afd1512 commit 65d98fb
Show file tree
Hide file tree
Showing 4 changed files with 441 additions and 234 deletions.
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,24 @@
"bench": "node benchmark/index.js"
},
"devDependencies": {
"@babel/core": "^7.6.4",
"@babel/preset-env": "^7.6.3",
"@babel/core": "^7.7.2",
"@babel/preset-env": "^7.7.1",
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"@faustbrian/benchmarker": "^0.1.2",
"@oclif/dev-cli": "^1.22.2",
"@types/babel__core": "^7.1.3",
"@types/create-hash": "^1.2.1",
"@types/depcheck": "^0.8.1",
"@types/jest": "^24.0.21",
"@types/create-hash": "^1.2.2",
"@types/depcheck": "^0.9.0",
"@types/jest": "^24.0.22",
"@types/js-yaml": "^3.12.1",
"@types/node": "^12.12.5",
"@types/node": "^12.12.6",
"@types/prettier": "^1.18.3",
"@types/prompts": "^2.4.0",
"@types/rimraf": "^2.0.3",
"@types/uuid": "^3.4.6",
"@typescript-eslint/eslint-plugin": "^2.6.0",
"@typescript-eslint/parser": "^2.6.0",
"@typescript-eslint/eslint-plugin": "^2.6.1",
"@typescript-eslint/parser": "^2.6.1",
"babel-loader": "^8.0.6",
"capture-console": "^1.0.1",
"codecov": "^3.6.1",
Expand All @@ -82,20 +82,20 @@
"jest": "^24.9.0",
"jest-extended": "^0.11.2",
"js-yaml": "^3.13.1",
"lerna": "^3.18.3",
"lerna": "^3.18.4",
"lint-staged": "^9.4.2",
"moment": "^2.24.0",
"moment-timezone": "^0.5.27",
"nock": "^11.7.0",
"npm-check-updates": "^3.2.0",
"npm-check-updates": "^3.2.1",
"prettier": "^1.18.2",
"prompts": "^2.2.1",
"rimraf": "^3.0.0",
"sinon": "^7.5.0",
"tmp": "^0.1.0",
"ts-jest": "^24.1.0",
"typedoc": "^0.15.0",
"typescript": "^3.6.4",
"typescript": "^3.7.2",
"typesync": "^0.6.1",
"uuid": "^3.3.3"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/core-kernel/src/utils/assert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const assert = {
throw new AssertionException(message || "Expected the input to be null.");
}

return value as T;
return (value as unknown) as T;
},
sameLength: (a: string | unknown[], b: string | unknown[], message?: string): void => {
if (a.length !== b.length) {
Expand All @@ -31,7 +31,7 @@ export const assert = {
},
transaction: <T>(value: unknown, message?: string): T => {
if (!(value instanceof Transactions.Transaction)) {
throw new AssertionException(message || "Expected the input to be a transaction instance.")
throw new AssertionException(message || "Expected the input to be a transaction instance.");
}

return (value as unknown) as T;
Expand All @@ -42,7 +42,7 @@ export const assert = {
throw new AssertionException(message || "Expected the input not to be defined.");
}

return value as T;
return (value as unknown) as T;
},
null: <T>(value: unknown, message?: string): T => {
if (value === null) {
Expand Down
2 changes: 1 addition & 1 deletion packages/core-p2p/src/network-monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export class NetworkMonitor implements Contracts.P2P.INetworkMonitor {
.slice(0, maxPeersPerPeer)
.reduce(
// @ts-ignore
(acc, curr: Contracts.P2P.Peer) => ({
(acc: object, curr: Contracts.P2P.Peer) => ({
...acc,
...{ [Utils.assert.defined<string>(curr.ip)]: curr },
}),
Expand Down
Loading

0 comments on commit 65d98fb

Please sign in to comment.