Skip to content

Commit 8c71bcf

Browse files
committed
types: make types compatible for React 18
1 parent 14a07f2 commit 8c71bcf

File tree

5 files changed

+20
-18
lines changed

5 files changed

+20
-18
lines changed

package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
"@testing-library/react": "^13.0.0",
4848
"@testing-library/react-hooks": "^8.0.0-alpha.1",
4949
"@types/jest": "^27.4.1",
50-
"@types/react": "^17.0.43",
51-
"@types/react-dom": "^17.0.14",
50+
"@types/react": "^18.0.1",
51+
"@types/react-dom": "^18.0.0",
5252
"babel-jest": "^27.5.1",
5353
"esbuild": "^0.14.31",
5454
"husky": ">=7.0.4",
@@ -66,6 +66,5 @@
6666
},
6767
"lint-staged": {
6868
"*.{js,jsx,ts,tsx,json,md}": "prettier --write"
69-
},
70-
"dependencies": {}
69+
}
7170
}

packages/core/src/Subscribe.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const Throw = () => {
3737
* @remarks This Component doesn't trigger any updates from the source$.
3838
*/
3939
export const Subscribe: React.FC<{
40+
children?: React.ReactNode | undefined
4041
source$?: Observable<any>
4142
fallback?: NonNullable<ReactNode> | null
4243
}> = ({ source$, children, fallback }) => {

packages/core/src/test-helpers/TestErrorBoundary.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Component, ErrorInfo } from "react"
22

33
export class TestErrorBoundary extends Component<
44
{
5+
children?: React.ReactNode | undefined
56
onError: (error: Error, errorInfo: ErrorInfo) => void
67
},
78
{

packages/dom/src/batchUpdates.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const [useLatestNumber, latestNumber$] = bind(
2424

2525
class TestErrorBoundary extends Component<
2626
{
27+
children?: React.ReactNode | undefined
2728
onError: (error: Error, errorInfo: ErrorInfo) => void
2829
},
2930
{

0 commit comments

Comments
 (0)