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
@AnyhowStep Thanks for reply. I didn't know that. But only /*#__PURE__*/ is widely used in downstream tools, like rollup (pack tool) or uglify/terser (minify tool).
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...
Activity
AnyhowStep commentedon Jun 24, 2019
Why not make it a JSDoc?
Output:
AlCalzone commentedon Jun 24, 2019
This is #13721 I think
LongTengDao commentedon Jun 24, 2019
@AnyhowStep Thanks for reply. I didn't know that. But only
/*#__PURE__*/
is widely used in downstream tools, likerollup
(pack tool) oruglify
/terser
(minify tool).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...
ashi009 commentedon Sep 17, 2019
@AlCalzone
#13721 is mainly for classes, which is fixed in #16631. This is actually #7770.
@LongTengDao
A workaround is to add parentheses around the
pure
expression, which will preserve the comment until this is fixed.LongTengDao commentedon Sep 17, 2019
@ashi009 Oh, that works, thank you!
Anyway, I wrote my personal ts transpiler (@ ltd/j-ts) ;)
LongTengDao commentedon Dec 25, 2023
seems fixed in 5.3
jakebailey commentedon Jan 4, 2024
Yes, this was fixed by #47407 (and #47158 was a dupe of this one).