How do I properly document if module.exports files are required so that documentation is not lost?

I've tried to follow the JSDoc Guidelines correctly for all my code, and it looks like I've documented my constructors correctly so that editors can recognize the arguments:

Documentation appears to work

But for some reason, when I export the classes so that they can be required elsewhere, they are no longer recognized anywhere else:

No docs once exported

Am I missing something on how should I export the class or document the export that confuses editors when the user requests my library? The require statement itself works and editors have no problem navigating to the source file specified in the require ( './YLTProfile'

) statement , but for whatever reason, the definition information is completely lost.


Here's another example to illustrate how he can see the definition of a class and I can ctrl + click to go to it (definition shown on the right), but it is highlighted in white and does not contain any information about the context or constructor parameters of the class.

enter image description here

+3


source to share


1 answer


It seems like you should have your module in node_modules, then it will automatically appear in libraries or manually add a library and point to the correct directory containing your module.



0


source







All Articles