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
4.9 regression: unexpected error using in operator on generic object intersected with {}Β #51549
constf=<Pextendsobject>(a: P&{})=>{// Unexpected error:// Type 'P & {}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator.ts(2638)"foo"ina;};
Activity
fatcerberus commentedon Nov 16, 2022
Duplicate of #51501 (
NonNullable<T>is defined asT & {}so it's the same issue) and the fix is #51502Andarist commentedon Nov 16, 2022
I can confirm that my PR fixes this issue. I've pushed out this repro case as an additional test case: 42ac98e