Closed
Description
Bug Report
π Search Terms
intersection never
π Version & Regression Information
- This changed between versions 4.9.0-dev.20220914 and 4.9.0-dev.20220915
β― Playground Link
Playground link with relevant code
π» Code
type AB = "A" | "B"
function x<T_AB extends AB>() {
let r2: never = null! as T_AB & undefined
}
π Actual behavior
The assignment of r2
fails with Type 'T_AB & undefined' is not assignable to type 'never'.
. Since T_AB
does not contain undefined
in its constraint, the intersection should reduce to never
(as it did in 4.8)
π Expected behavior
The assignment should succeed.