Skip to content

Commit

Permalink
Upgrade TypeScript to 4.9.5
Browse files Browse the repository at this point in the history
I want to use the `satsifies` operator introduced in 4.9 [1].

Ran `npm install typescript@4.9.5 typedoc@latest`, and then upgraded
@types/node to ^18.0.0, to fix [2].

The TypeScript upgrade introduced one compilation error, which I’ve
fixed here.

I’m targeting the v2 integration branch (which uses the latest webpack)
since trying to upgrade TypeScript on `main` is giving some webpack
errors that don’t seem worth trying to understand.

[1] https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html#the-satisfies-operator
[2] microsoft/TypeScript#51567
  • Loading branch information
lawrence-forooghian committed May 11, 2023
1 parent 89602c7 commit 5f69795
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 75 deletions.
159 changes: 88 additions & 71 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"devDependencies": {
"@ably/vcdiff-decoder": "1.0.4",
"@types/crypto-js": "^4.0.1",
"@types/node": "^15.0.0",
"@types/node": "^18.0.0",
"@types/request": "^2.48.7",
"@types/ws": "^8.2.0",
"@typescript-eslint/eslint-plugin": "^5.14.0",
Expand Down Expand Up @@ -68,8 +68,8 @@
"ts-loader": "^9.4.2",
"tsconfig-paths-webpack-plugin": "^4.0.1",
"tslib": "^2.3.1",
"typedoc": "^0.23.8",
"typescript": "^4.6.4",
"typedoc": "^0.24.7",
"typescript": "^4.9.5",
"webpack": "^5.79.0",
"webpack-cli": "^5.0.1"
},
Expand Down
2 changes: 1 addition & 1 deletion src/common/lib/util/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export function arrIntersect<T>(arr1: Array<T>, arr2: Array<T>): Array<T> {
return result;
}

export function arrIntersectOb<T>(arr: Array<T>, ob: Record<string, unknown>): T[] {
export function arrIntersectOb(arr: Array<string>, ob: Record<string, unknown>): string[] {
const result = [];
for (let i = 0; i < arr.length; i++) {
const member = arr[i];
Expand Down

0 comments on commit 5f69795

Please sign in to comment.