This type inference improvement is perhaps best explained by way of an example. For the following code

the compiler will now know that, if the first clause in the and above is satisfied, then, in the second clause, x must be of type string. Combined with the count specialization mentioned above, this causes efficient JavaScript to be generated: