-
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
TSC remove comments even when removeComments to false #16727
Comments
You mean does remove comments, correct? The compiler does seem to erase comments in some surprising ways. |
This sort of seem related to #1665 in that the compiler will erase comments where it thinks the comment is related to some code it is not emitting, but obviously it is getting a but over active in some positions. |
You're right, I edited my question. It's erasing the comments as you mention. Ohh, I was afraid it was a bug, thanks for pointing that issue. |
As per #3844 using this.form['additionalName'].customValidationMessage = /*! i18nextract */ 'Some message'; while if the comment is moved to another line, it works. this.form['additionalName'].customValidationMessage =
/*! i18nextract */ 'Some message'; As per @yuit it was fixed, but it seems it is not fixed for all cases. I am using typescript 2.3.4 |
looks like a duplicate of #17606 |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
I think I found one of the "mysterious ways" TSC would ignore the In case the link expires, here is the code:
The commented out lines Not sure if this is a feature or bug -__- |
For React with typescript user, adding |
TypeScript Version: 2.4.0
Code
Expected behavior:
Actual behavior:
If I wrote the comment above the declaration, it works, but I need that comment because is going to help me with Uglify to know that this is a pure function with no side-effects.
The text was updated successfully, but these errors were encountered: