Why TypeScript flow analysis doesn't cover else block?
Let’s consider the following code: function f(x : number) { if (x === 1) { if (x === 2) {} // error } else { if (x === 1) {} // OK } } Here, the compiler gives me an error on x === 2. The reason is simple: if execution has reached this block… Read More Why TypeScript flow analysis doesn't cover else block?