You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// A *self-contained* demonstration of the problem follows...lets: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.