You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While it worked fine with the older React version, now it throws this error:
test.tsx:33:5 - error TS2322: Type 'RefObject<HTMLDivElement | null>' is not assignable to type 'RefObject<HTMLElement>'.
Type 'HTMLDivElement | null' is not assignable to type 'HTMLElement'.
Type 'null' is not assignable to type 'HTMLElement'.
33 nodeRef={nodeRef}
~~~~~~~
index.d.ts:53:5
53 nodeRef?: React.RefObject<HTMLElement>,
~~~~~~~
The expected type comes from property 'nodeRef' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<Draggable> & Pick<Readonly<Partial<DraggableProps>>, never> & InexactPartial<...> & InexactPartial<...>'
The text was updated successfully, but these errors were encountered:
Philipp91
added a commit
to Philipp91/react-draggable
that referenced
this issue
Dec 7, 2024
To reproduce, run the type checker with the new React version, e.g. like this:
npm update
,cd typings
../node_modules/typescript/bin/tsc
While it worked fine with the older React version, now it throws this error:
The text was updated successfully, but these errors were encountered: