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
When a component is created via JSX, it "forgets"/erases the type of the underlying component and assumes that it's simply a JSX.Element. This is an incorrect assumption when the type that the function is some intersection, e.g. a component that returns JSX.Element & FooTy (see stackblitz).
Yeah I think we could benefit from this even more than React given we can have real DOM element types. Anyway, all good. This issue can be a reference for the next person who comes along.
Describe the bug
When a component is created via JSX, it "forgets"/erases the type of the underlying component and assumes that it's simply a
JSX.Element
. This is an incorrect assumption when the type that the function is some intersection, e.g. a component that returnsJSX.Element & FooTy
(see stackblitz).Your Example Website or App
https://stackblitz.com/edit/solidjs-templates-dch5bb?file=src%2FApp.tsx
Steps to Reproduce the Bug or Issue
Expected behavior
<Foo />
should have the same type asFoo()
.Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: