File tree 4 files changed +14
-4
lines changed
4 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 83
83
"@testing-library/react" : " ^14.1.2" ,
84
84
"@testing-library/react-hooks" : " ^8.0.1" ,
85
85
"@types/node" : " ^20.11.6" ,
86
+ "@types/prop-types" : " ^15.7.12" ,
86
87
"@types/react" : " 18.2.25" ,
87
88
"@typescript-eslint/eslint-plugin" : " ^6.17.0" ,
88
89
"@typescript-eslint/parser" : " ^6.17.0" ,
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ describe('React', () => {
169
169
action . type === 'INC' ? state + 1 : state
170
170
171
171
const innerStore = createStore ( reducer )
172
- const innerMapStateToProps = vi . fn < TStateProps , [ number ] > ( ( state ) => ( {
172
+ const innerMapStateToProps = vi . fn < [ number ] , TStateProps > ( ( state ) => ( {
173
173
count : state ,
174
174
} ) )
175
175
class Inner extends Component < TStateProps > {
Original file line number Diff line number Diff line change @@ -801,16 +801,17 @@ function testRef() {
801
801
ref = { ( ref : number ) => { } }
802
802
> </ ConnectedForwardedFunctionalComponent >
803
803
804
- // Should be able to use all refs including legacy string
805
- const classLegacyRef : React . LegacyRef < ClassComponent > | undefined = undefined
804
+ // Should be able to use all refs (except legacy string refs, which go away in React 19)
805
+ const classLegacyRef : React . Ref < ClassComponent > | undefined = undefined
806
806
; < ConnectedClassComponent ref = { classLegacyRef } > </ ConnectedClassComponent >
807
807
; < ConnectedClassComponent
808
808
ref = { React . createRef < ClassComponent > ( ) }
809
809
> </ ConnectedClassComponent >
810
810
; < ConnectedClassComponent
811
811
ref = { ( ref : ClassComponent ) => { } }
812
812
> </ ConnectedClassComponent >
813
- ; < ConnectedClassComponent ref = { '' } > </ ConnectedClassComponent >
813
+ // TODO Can make this an expected error if we target React 19 exclusively
814
+ // ;<ConnectedClassComponent ref={''}></ConnectedClassComponent>
814
815
// ref type should be the typeof the wrapped component
815
816
; < ConnectedClassComponent
816
817
// @ts -expect-error
Original file line number Diff line number Diff line change @@ -2362,6 +2362,13 @@ __metadata:
2362
2362
languageName : node
2363
2363
linkType : hard
2364
2364
2365
+ " @types/prop-types@npm:^15.7.12 " :
2366
+ version : 15.7.12
2367
+ resolution : " @types/prop-types@npm:15.7.12"
2368
+ checksum : 10/ac16cc3d0a84431ffa5cfdf89579ad1e2269549f32ce0c769321fdd078f84db4fbe1b461ed5a1a496caf09e637c0e367d600c541435716a55b1d9713f5035dfe
2369
+ languageName : node
2370
+ linkType : hard
2371
+
2365
2372
" @types/react-dom@npm:^18.0.0 " :
2366
2373
version : 18.2.18
2367
2374
resolution : " @types/react-dom@npm:18.2.18"
@@ -7131,6 +7138,7 @@ __metadata:
7131
7138
" @testing-library/react " : " npm:^14.1.2"
7132
7139
" @testing-library/react-hooks " : " npm:^8.0.1"
7133
7140
" @types/node " : " npm:^20.11.6"
7141
+ " @types/prop-types " : " npm:^15.7.12"
7134
7142
" @types/react " : " npm:18.2.25"
7135
7143
" @types/use-sync-external-store " : " npm:^0.0.3"
7136
7144
" @typescript-eslint/eslint-plugin " : " npm:^6.17.0"
You can’t perform that action at this time.
0 commit comments