Skip to content

Commit

Permalink
Upgrade to TypeScript 5.5 (#11895)
Browse files Browse the repository at this point in the history
* chore: move to TypeScript 55

https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/

* test: expect enum mismatch
* bump type-fest to latest
  • Loading branch information
mxdvl authored Jul 16, 2024
1 parent a89d283 commit 0846e81
Show file tree
Hide file tree
Showing 5 changed files with 476 additions and 264 deletions.
2 changes: 1 addition & 1 deletion apps-rendering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"ts-loader": "9.5.1",
"tslib": "2.6.2",
"tsx": "4.6.2",
"typescript": "5.3.3",
"typescript": "5.5.3",
"webpack": "5.91.0",
"webpack-cli": "5.1.4",
"webpack-dev-server": "5.0.4",
Expand Down
1 change: 1 addition & 0 deletions apps-rendering/src/video.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ describe('parseVideo', () => {
type: ElementType.VIDEO,
assets: [
{
// @ts-expect-error -- these enums are actually compatible
type: AssetType.VIDEO,
},
],
Expand Down
4 changes: 2 additions & 2 deletions dotcom-rendering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@
"ts-unused-exports": "8.0.5",
"tslib": "2.6.2",
"tsx": "4.6.2",
"type-fest": "4.6.0",
"typescript": "5.3.3",
"type-fest": "4.21.0",
"typescript": "5.5.3",
"typescript-json-schema": "0.58.1",
"unified": "11.0.5",
"valibot": "0.28.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const findMostReferredToBucketId = ({

for (const answerFromQuestion of answersFromQuestion) {
for (const answerBucket of answerFromQuestion.answerBuckets) {
if (answerBucket in bucketCounter) {
if (typeof bucketCounter[answerBucket] === 'number') {
bucketCounter[answerBucket] += 1;
} else {
bucketCounter[answerBucket] = 1;
Expand Down
Loading

0 comments on commit 0846e81

Please sign in to comment.