-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Do not remove PURE comment after typed declaration #32060
Comments
Why not make it a JSDoc? /**
* __PURE__
*/
const a : Type = function () {}(); Output: /**
* __PURE__
*/
var a = function () { }(); |
This is #13721 I think |
@AnyhowStep Thanks for reply. I didn't know that. But only BTW: I wonder why the comment removed, it's just same line with types syntax, not same part of an expression, even not same side of assignment equal mark... |
#13721 is mainly for classes, which is fixed in #16631. This is actually #7770. A workaround is to add parentheses around the const a : Type = (/*#__PURE__*/ function () {}());
// var a = ( /*#__PURE__*/function () { }()); |
@ashi009 Oh, that works, thank you! Anyway, I wrote my personal ts transpiler (@ ltd/j-ts) ;) |
seems fixed in 5.3 |
TypeScript Version: 3.4.0-dev.201xxxxx
Search Terms:
Code
Expected behavior:
Actual behavior:
Playground Link:
Related Issues:
The text was updated successfully, but these errors were encountered: