Closed
Description
Current implementation is very conservative when looking for assignments during application of type narrowing.
function len(x: number | string) {
if (typeof x === 'number') {
var t = x.toExponential();
//x = "aaaa"; // uncomment me
}
}
variable is reassigned after the usage of narrowed type but type narrowing still not kicked in