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
{{ message }}
Repository navigation
StyledComponent cannot be used as a JSX component - Typescript error #3377
Every @emotion/styled component fails type-checking as a JSX element with TS2604/TS2786 ("does not have any construct or call signatures") when a project declares a global const React: typeof import('react').
To reproduce:
I'm not an expert when it comes to bundling and stuff but by using LLM I was able to come up with this repo: https://github.com/pciarach/react-import-repro. README contains a potential fix (which helped locally) but I have no idea whether it is the correct way to solve it.
Expected behavior:
These components are correct JSX elements so they should not be reported by Typescript as invalid.
Activity