Skip to content

Commit

Permalink
test: Adjust type tests to be compatible with React 18 typings (#1868)
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon authored Jan 31, 2022
1 parent 422c869 commit 87c5621
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
11 changes: 9 additions & 2 deletions test/typetests/react-redux-types.typetest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ class App extends Component<any, any> {

const targetEl = document.getElementById('root')

ReactDOM.render(<Provider store={store}>{() => <App />}</Provider>, targetEl)
ReactDOM.render(
<Provider store={store}>
<App />
</Provider>,
targetEl
)

declare var store: Store<TodoState>
class MyRootComponent extends Component<any, any> {}
Expand All @@ -125,7 +130,9 @@ declare var todoActionCreators: { [type: string]: (...args: any[]) => any }
declare var counterActionCreators: { [type: string]: (...args: any[]) => any }

ReactDOM.render(
<Provider store={store}>{() => <MyRootComponent />}</Provider>,
<Provider store={store}>
<MyRootComponent />
</Provider>,
document.body
)

Expand Down
13 changes: 1 addition & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2616,18 +2616,7 @@ __metadata:
languageName: node
linkType: hard

"@types/react@npm:*":
version: 17.0.19
resolution: "@types/react@npm:17.0.19"
dependencies:
"@types/prop-types": "*"
"@types/scheduler": "*"
csstype: ^3.0.2
checksum: 369578687b39d66fafcb2e41b9e12a0aa0dda8db5661b68d4c9bd7679d3da96515c69905b1a882f2da01988104dca30d400811e1488ed146ac98d246e8e67695
languageName: node
linkType: hard

"@types/react@npm:^17.0.35":
"@types/react@npm:*, @types/react@npm:^17.0.35":
version: 17.0.35
resolution: "@types/react@npm:17.0.35"
dependencies:
Expand Down

0 comments on commit 87c5621

Please sign in to comment.