Do not remove PURE comment after typed declaration
See original GitHub issueTypeScript Version: 3.4.0-dev.201xxxxx
Search Terms:
Code
const a :Type = /*#__PURE__*/ function () {}();
Expected behavior:
const a = /*#__PURE__*/ function () {}();
Actual behavior:
const a = function () {}();
Playground Link:
Related Issues:
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
JavaParser doesn't remove comments before package ...
The easiest way to remove all comments is to configure JavaParser not to handle comments at all: import com.github.javaparser.ast.
Read more >Nim Manual
The variable's type is called static type, the location's type is called dynamic type. If the static type is not the same as...
Read more >css-loader | webpack - JS.ORG
With the help of the /* webpackIgnore: true */ comment, it is possible to disable sources handling for rules and for individual declarations....
Read more >Doxygen Manual: Special Commands
Indicates that a comment block contains documentation for a function (either global or as a member of a class). This command is only...
Read more >LLVM Language Reference Manual
For example, the following instruction is syntactically okay, but not well formed: ... This linkage type is only allowed on definitions, not declarations....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.@ashi009 Oh, that works, thank you!
Anyway, I wrote my personal ts transpiler (@ ltd/j-ts) π