Retain TSDoc comments
See original GitHub issueThe current behavior is that Top-level comments are stripped away:
// input:
/**
* Foo type description
* /
type Foo = {
/**
* bar prop description
* /
bar: string;
};
// output:
export declare type Foo = {
/**
* bar prop description
* /
bar: string;
};
Which is a problem when wanting to use the top level comment blocks as code hints or to feed into a documentation generator.
It would be great if docblock comments could be retained.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
TS: What is TSDoc?. The way to write the better comments
TSDoc is doc comments for typescript code. You can define metadata and API documents for the code. Typescript provides static typing.
Read more >Preserve JSDocs in *.d.ts files when stripping comments #14619
I'd like to strip out any internal comments but preserve any JSDocs comments. It seems that an option to preserve comments in types...
Read more >Where is the syntax for TypeScript comments documented?
The right syntax is now the one used by TSDoc. It will allow you to have your comments understood by Visual Studio Code...
Read more >Comments in Typescript - Visual Studio Marketplace
"Comment TS" generates a template for JSDoc comments. It is adapted for TypeScript files. Typescript comes with a lot of language annotations, ...
Read more >Doc Comments - TypeDoc
TypeDoc implements a minimal parser for your comments which extracts TSDoc/JSDoc tags and recognizes code blocks to ignore decorators.
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
I just had a hope that dts-bundle-generator will have such useful option.
Okay, thanks, I’ll do it that way.
@timocov If possible, I also hope to add this function.like
gulp-typescript