(T | undefined) & T
has different behavior when T is known versus when T is a type variable
#46976
Labels
Milestone
Bug Report
π Search Terms
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
The type expression
(T | undefined) & T
evaluates to itself whenT
is a type variable.π Expected behavior
Either
(T | undefined) & T
should evaluate toT
whenT
is a type variable since that's the behavior with known types, or(T | undefined) & T
should not evaluate toT
whenT
is a known type (and should instead evaluate to something else in both cases--never
maybe?).The text was updated successfully, but these errors were encountered: