fix(react): drop JSX namespace import from public type declarations (#4645)
* Fix #4637: Declare React peer dependencies for posthog-js/react * fix: declare @types/react peer, regenerate lockfile, add changeset Unblocks CI (ERR_PNPM_OUTDATED_LOCKFILE) and closes the TypeScript half of the same resolution gap; test no longer pins the exact version range. * Repair PR #4638: fix: Declare React peer dependencies for posthog-js/react * Repair PR #4638: fix: Declare React peer dependencies for posthog-js/react * fix(react): drop JSX namespace import from public type declarations Return ReactElement instead of JSX.Element so the emitted .d.ts typechecks against @types/react back to 16.9.0, and correct the peer range to match. * test: assert the @types/react floor separately from the React floor The two peers have different minimums: hooks (16.8.0) for react, and ReactElement's props default (16.9.0) for @types/react. * test: decouple the @types/react floor from the React floor The two peers share a value today but encode different constraints; record why the types range is deliberately below what the declarations require. * fix(react): spell return types as ReactElement<any, any> Exactly the definition of JSX.Element, so the public types are unchanged and @types/react stays at the 16.8.0 floor with no react/@types desync. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
A
Anna Garcia committed
cb7cc128d06913552bccd08c0b32f21df97537da
Parent: 8157276
Committed by GitHub <noreply@github.com>
on 8/25/2026, 4:34:27 PM