File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ describe('React', () => {
169169 action . type === 'INC' ? state + 1 : state
170170
171171 const innerStore = createStore ( reducer )
172- const innerMapStateToProps = vi . fn < TStateProps , [ number ] > ( ( state ) => ( {
172+ const innerMapStateToProps = vi . fn < [ number ] , TStateProps > ( ( state ) => ( {
173173 count : state ,
174174 } ) )
175175 class Inner extends Component < TStateProps > {
Original file line number Diff line number Diff line change @@ -801,16 +801,17 @@ function testRef() {
801801 ref = { ( ref : number ) => { } }
802802 > </ ConnectedForwardedFunctionalComponent >
803803
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
806806 ; < ConnectedClassComponent ref = { classLegacyRef } > </ ConnectedClassComponent >
807807 ; < ConnectedClassComponent
808808 ref = { React . createRef < ClassComponent > ( ) }
809809 > </ ConnectedClassComponent >
810810 ; < ConnectedClassComponent
811811 ref = { ( ref : ClassComponent ) => { } }
812812 > </ ConnectedClassComponent >
813- ; < ConnectedClassComponent ref = { '' } > </ ConnectedClassComponent >
813+ // TODO Can make this an expected error if we target React 19 exclusively
814+ // ;<ConnectedClassComponent ref={''}></ConnectedClassComponent>
814815 // ref type should be the typeof the wrapped component
815816 ; < ConnectedClassComponent
816817 // @ts -expect-error
You can’t perform that action at this time.
0 commit comments