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
undefined + 1 evaluates as NaN. Maybe y should be typed as the literal NaN value. NaN is almost as troublesome as null in places, and harder to deal with (NaN !== NaN, typeof NaN === 'number'). It's one of those cases of the compiler being technically correct but not very useful. Perhaps we could consider treating it specially as well.
value+"" is often used in place of String(value) and so this seems expected.
TypeScript Version: 2.1.4
With strictNullChecks on:
Code
Expected behavior:
An error telling me this is the wrong thing to do.
Actual behavior:
Compiles fine, y is a number.
This does the same thing for all the arithmetic operators.
The text was updated successfully, but these errors were encountered: