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
Contextual signature for onClick fails to be computed here when using JSX but it works just fine with a regular function call.
The problem here is that the contextual type of JSX attributes is an intersection as it includes IntrinsicAttributes. Because of that getTypeOfPropertyOfContextualType fails to call substituteIndexedMappedType appropriately - this is something that is being already fixed by #52095
π Expected behavior
Since JSX is roughly meant to be a sugar for function calls both of those should behave the same way.
The text was updated successfully, but these errors were encountered:
Bug Report
π Search Terms
contextual type property mapped type inference jsx
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
Contextual signature for
onClick
fails to be computed here when using JSX but it works just fine with a regular function call.The problem here is that the contextual type of JSX attributes is an intersection as it includes
IntrinsicAttributes
. Because of thatgetTypeOfPropertyOfContextualType
fails to callsubstituteIndexedMappedType
appropriately - this is something that is being already fixed by #52095π Expected behavior
Since JSX is roughly meant to be a sugar for function calls both of those should behave the same way.
The text was updated successfully, but these errors were encountered: