Skip to content

Commit aaa1927

Browse files
aryaemami59markerikson
authored andcommitted
Add @ts-ignore for type issue related to @types/react ^18.61
1 parent a3ef256 commit aaa1927

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/typetests/connect-options-and-issues.test-d.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,8 +786,11 @@ describe('type tests', () => {
786786
// Should be able to pass modern refs to a ForwardRefExoticComponent
787787
const modernRef: React.Ref<string> | undefined = undefined
788788
;<ConnectedForwardedFunctionalComponent ref={modernRef} />
789-
// Should be able to use legacy string refs
790-
;<ConnectedForwardedFunctionalComponent ref={''} />
789+
// Should not be able to use legacy string refs
790+
;<ConnectedForwardedFunctionalComponent
791+
// @ts-ignore FIXME: If we use `@ts-expect-error` here, we will get an `Unused `@ts-expect-error` directive` error if we have `@types/react` ^18.61.
792+
ref={''}
793+
/>
791794
// ref type should agree with type of the forwarded ref
792795
;<ConnectedForwardedFunctionalComponent
793796
// @ts-expect-error

0 commit comments

Comments
 (0)