-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String + - operators #7019
Comments
So yeah, that this is allowed is expected - and also somewhat common, it's actually (usefully) used in one place within the TS compiler (inside the parser). It's somewhat more reliable than doing As far as types are concerned, it all checks out - however, if you're looking to forbid this kind of usage of unary plus/minus in your own code, I can recommend writing a tslint rule for it. |
Ty.
|
var a = -"test";
var b = "test1" + + "test2"
Above code causes no compile errors. Is this expected?
The text was updated successfully, but these errors were encountered: