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
3.5 regression concerning type inference for non-inferable types #31735
This is an effect of #30637, a known breaking change. In your example we make no inferences for the Props type parameter in the call to createStyles. This means we default to unknown, but since that doesn't satisfy the constraint object, we pick object. Previously we'd default to {} which did satisfy the constraint.
Activity
ahejlsberg commentedon Jun 3, 2019
This is an effect of #30637, a known breaking change. In your example we make no inferences for the
Propstype parameter in the call tocreateStyles. This means we default tounknown, but since that doesn't satisfy the constraintobject, we pickobject. Previously we'd default to{}which did satisfy the constraint.eps1lon commentedon Jun 4, 2019
Suspected as much though I wasn't aware how this interacts with non-inferrable types. Thanks for the explanation.