Skip to content

Commit 02ec877

Browse files
authored
chore: update codebase to TS 5 (#2210)
* chore: update codebase to TS 5 * chore: update workflow to test against typescript 5 and above
1 parent 075468c commit 02ec877

File tree

48 files changed

+51
-85
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+51
-85
lines changed

Diff for: .github/publish-ci/cra4/tsconfig.json

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"lib": [
5-
"dom",
6-
"dom.iterable",
7-
"esnext"
8-
],
4+
"lib": ["dom", "dom.iterable", "esnext"],
95
"allowJs": true,
106
"skipLibCheck": true,
117
"esModuleInterop": true,
128
"allowSyntheticDefaultImports": true,
139
"strict": true,
14-
"forceConsistentCasingInFileNames": true,
1510
"noFallthroughCasesInSwitch": true,
1611
"module": "esnext",
1712
"moduleResolution": "node",
@@ -20,7 +15,5 @@
2015
"noEmit": true,
2116
"jsx": "react-jsx"
2217
},
23-
"include": [
24-
"src"
25-
]
18+
"include": ["src"]
2619
}

Diff for: .github/publish-ci/cra5/tsconfig.json

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"lib": [
5-
"dom",
6-
"dom.iterable",
7-
"esnext"
8-
],
4+
"lib": ["dom", "dom.iterable", "esnext"],
95
"allowJs": true,
106
"skipLibCheck": true,
117
"esModuleInterop": true,
128
"allowSyntheticDefaultImports": true,
139
"strict": true,
14-
"forceConsistentCasingInFileNames": true,
1510
"noFallthroughCasesInSwitch": true,
1611
"module": "esnext",
1712
"moduleResolution": "node",
@@ -20,7 +15,5 @@
2015
"noEmit": true,
2116
"jsx": "react-jsx"
2217
},
23-
"include": [
24-
"src"
25-
]
18+
"include": ["src"]
2619
}

Diff for: .github/publish-ci/next/tsconfig.json

+3-14
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"lib": [
5-
"dom",
6-
"dom.iterable",
7-
"esnext"
8-
],
4+
"lib": ["dom", "dom.iterable", "esnext"],
95
"allowJs": true,
106
"skipLibCheck": true,
117
"strict": false,
12-
"forceConsistentCasingInFileNames": true,
138
"noEmit": true,
149
"esModuleInterop": true,
1510
"module": "esnext",
@@ -19,12 +14,6 @@
1914
"jsx": "preserve",
2015
"incremental": true
2116
},
22-
"include": [
23-
"next-env.d.ts",
24-
"**/*.ts",
25-
"**/*.tsx"
26-
],
27-
"exclude": [
28-
"node_modules"
29-
]
17+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
18+
"exclude": ["node_modules"]
3019
}

Diff for: .github/publish-ci/vite/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"esModuleInterop": false,
99
"allowSyntheticDefaultImports": true,
1010
"strict": true,
11-
"forceConsistentCasingInFileNames": true,
1211
"module": "ESNext",
1312
"moduleResolution": "Node",
1413
"resolveJsonModule": true,

Diff for: .github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
strategy:
124124
matrix:
125125
node: ['18.x']
126-
ts: ['4.5', '4.6', '4.7', '4.8', '4.9']
126+
ts: ['5.0', '5.1', '5.2']
127127

128128
steps:
129129
- name: Checkout repo

Diff for: demo/src/sandboxes/animating-auto/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/card/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/cards-stack/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/chain/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/css-gradients/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/css-keyframes/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/css-variables/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/draggable-list/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/exit-before-enter/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/flip-card/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/floating-button/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/goo-blobs/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/image-fade/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/list-reordering/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/macos-dock/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/masonry/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/multistage-transition/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/notification-hub/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/parallax-sticky/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/parallax-vert/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/parallax/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/popup-modal/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/rocket-decay/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/scrolling-wave/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/simple-transition/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/slide/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/smile-grid/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/springy-boxes/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/svg-filter/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/trail/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/tree/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/viewpager/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/src/sandboxes/webgl-switch/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"jsx": "react",
1010
"moduleResolution": "node",
1111
"rootDir": "src",
12-
"forceConsistentCasingInFileNames": true,
1312
"noImplicitReturns": true,
1413
"noImplicitThis": true,
1514
"noImplicitAny": true,

Diff for: demo/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"esModuleInterop": false,
99
"allowSyntheticDefaultImports": true,
1010
"strict": true,
11-
"forceConsistentCasingInFileNames": true,
1211
"module": "ESNext",
1312
"moduleResolution": "Node",
1413
"resolveJsonModule": true,

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
"three": "^0.150.1",
107107
"tsup": "^6.7.0",
108108
"turbo": "^1.8.3",
109-
"typescript": "4.9.5",
109+
"typescript": "5.2.2",
110110
"vite": "^4.1.4",
111111
"zdog": "^1.1.3"
112112
},

Diff for: packages/core/src/hooks/useInView.ts

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export function useInView<TElement extends HTMLElement>(
6666

6767
const onEnter = () => {
6868
if (to) {
69+
// @ts-expect-error – TODO: fix this type error
6970
api.start(to)
7071
}
7172

0 commit comments

Comments
 (0)