Closed
Description
What, all this business with union types, indeed a veritable managerie of type-related tricks, and we can't make the basics work?
function borked(): number {
if (false)
return 1;
}
I know this will be flagged with the dreaded "By Design", because of some silly JavaScript use case that I can't imagine, but it's such an obviously wrong feature of the language that I can't help raising as an issue. (Apologies if it's a duplicate.)