spread of overloaded function rejected on generic components in JSX as of 4.7.4 #51577
Labels
Fix Available
A PR has been opened for this issue
Needs Investigation
This issue needs a team member to investigate its status.
Milestone
Bug Report
π Search Terms
spread jsx generic overload
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
Spread types may only be created from object types.(2698)
unless we save
omit(['foo'], otherProps)
in an intermediate variable and spread that instead (work around in playground).π Expected behavior
No error since it's valid at runtime. It's also accepted by TS without JSX or on non-generic components or if we save the value in an intermediate variable. All cases are explored in the playground.
The text was updated successfully, but these errors were encountered: