Emit JSDoc-style comments
See original GitHub issueHello, thanks for this project 👍 One thing I would like to have is the JsDoc comments associated with a declaration:
/**
* A meaningless declaration.
*/
const hello = "world";
current result:
VariableDeclaration {
name: 'hello',
isConst: true,
isExported: false,
type: undefined,
start: 38,
end: 60 }
desired result:
VariableDeclaration {
comment: '/**\n * A meaningless declaration.\n */',
name: 'hello',
isConst: true,
isExported: false,
type: undefined,
start: 38,
end: 60 }
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Suggestion: Generate doc comments in emitted JS #10 - GitHub
Support some level of automatically generating doc comments for non-TypeScript JavaScript consumers. Need more details on what exactly people would like to ...
Read more >Getting Started with JSDoc 3
JSDoc comments should generally be placed immediately before the code being documented. Each comment must start with a /** sequence in order to...
Read more >How do I add JSDoc comments to typescript generated with ...
Presently, emitting JSDoc comments is not supported. There is an open issue in TypeScript repository: ...
Read more >Commenting JavaScript code with JSDoc - Engineering Blog
A great benefit of JSDoc style comments is that they could change the way your organization creates documentation dramatically.
Read more >TypeScript in JavaScript using JSDoc comments - Shareup
ts files so I'll tell tsc to not “emit” anything when it's run. $ npx tsc --noEmit *.js error TS6504: File 'average.js' is...
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
Maybe I was too fast… https://stackoverflow.com/questions/47429792/is-it-possible-to-get-comments-as-nodes-in-the-ast-using-the-typescript-compiler
I checked the AST that is generated. Sadly, you have no clue, where comments are in the document. So the only option to add comments is to add them manually.
Therefore, this can’t be implemented.