-
Notifications
You must be signed in to change notification settings - Fork 190
TypeScript type error with React 19 types #708
Copy link
Copy link
Closed
Labels
Description
Describe the bug
Type error with React v19 types. The global type namespace JSX has been removed for better compatibility with other JSX libs.
https://react.dev/blog/2024/04/25/react-19-upgrade-guide#the-jsx-namespace-in-typescript
To Reproduce Try and recreate the issue in a Codesandbox:
just use @types/react v19 and react-intersection-observer in a project, and run tsc (without skipLibChecks).
node_modules/react-intersection-observer/dist/index.d.mts:163:20 - error TS2694: Namespace 'global.JSX' has no exported member 'IntrinsicElements'.
163 as?: keyof JSX.IntrinsicElements;
~~~~~~~~~~~~~~~~~Expected behavior
no type error
Desktop (please complete the following information):
- OS: Windows 11
Reactions are currently unavailable