Skip to content

fix(fiber): prevent React.ElementType JSX type conflicts - #3900

Open
ayush-FullStack-dev wants to merge 2 commits into
pmndrs:masterfrom
ayush-FullStack-dev:fix/react-elementtype-3898
Open

fix(fiber): prevent React.ElementType JSX type conflicts#3900
ayush-FullStack-dev wants to merge 2 commits into
pmndrs:masterfrom
ayush-FullStack-dev:fix/react-elementtype-3898

Conversation

@ayush-FullStack-dev

Copy link
Copy Markdown

Fixes #3898

Summary

Fixes a TypeScript incompatibility where importing
@react-three/fiber caused React.ElementType JSX props
to resolve to never.

Changes

  • Prevent non-constructor Three.js exports from polluting JSX intrinsic elements.
  • Add a regression type test for React.ElementType.
  • Preserve existing R3F JSX typings.

Validation

  • yarn tsc --strict --emitDeclarationOnly false --noEmit
  • Local packed consumer reproduction ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeScript: React.ElementType becomes incompatible after importing @react-three/fiber

1 participant