Closed
Description
TypeScript Version: 2.0.8
Code
// A *self-contained* demonstration of the problem follows...
let s:string=("" && false);
Expected behavior:
Since ("" && false) is "" in JavaScript I should be able to assign the resulting value to a string, but TypeScript thinks that this will become a boolean.
Actual behavior:
Compiler error claiming that a boolean cannot be assigned to a string
Disclaimer: I think that the behaviour of the && operator in JavaScript is horrible, however it is what it is and TypeScript should honour it.