tsd-jsdoc icon indicating copy to clipboard operation
tsd-jsdoc copied to clipboard

correctly write doclets at es6 class constructors

Open HackbrettXXX opened this issue 6 years ago • 3 comments

A pull request to correctly write doc comments at es6 class constructors like described here.

HackbrettXXX avatar Apr 23 '19 15:04 HackbrettXXX

I just realized that this approach only works if the class is exported using export default. Otherwise, the constructor and class documentations are merged into a single doclet by jsdoc. This doclet has a description (for constructor doc) and classdesc property, as well as params. access defined at the constructor is lost, unfortunately.

By the way, how do you debug the tests? Are you using Webstorm? Somehow the debugger cannot attach to the sources of the template.

HackbrettXXX avatar Apr 24 '19 08:04 HackbrettXXX

By the way, how do you debug the tests? Are you using Webstorm? Somehow the debugger cannot attach to the sources of the template.

I don't use Webstorm I use Code and haven't had an issue debugging it before. Generally I setup a minimal test file and launch a parse process from Code against that one file to debug the specific issue I'm hitting.

englercj avatar Apr 24 '19 17:04 englercj

@englercj, @HackbrettXXX, I think I managed to fix the things around this topic.

Please see the PR#98. I started with cherry-picking @HackbrettXXX's commits, and eventually brought fixes in commit 82e01e4.

Key changes:

  • publish.ts: avoid removing doclets with an 'undocumented' attribute abusively set to true by jsdoc
  • Emitter.ts: fix the predicates for isConstructor()

alxroyer avatar Sep 06 '19 23:09 alxroyer