documentationjs / documentation

:book: documentation for modern JavaScript
http://documentation.js.org/
Other
5.79k stars 481 forks source link

Fix revealing module pattern support #379

Open jfirebaugh opened 8 years ago

jfirebaugh commented 8 years ago

70fbdedf0ce9fc376b55ff3d45ee3a3cd8829b4d commented out a test for the revealing module pattern. When uncommented, the test is failing.

tmcw commented 8 years ago

I removed this support on purpose because on further inspection our revealing module pattern support was super liberal and would give all kinds of false-positives - it doesn't check at all that the documented member is part of what's exported.

jfirebaugh commented 8 years ago

Fine by me. Let's remove the commented-out code in the test and implementation.

odub commented 8 years ago

Hey! Is there a way I can document a factory-style API in the current version of documentation.js?

Whatever I try, I seem to get member functions appearing separately from the factory.

odub commented 8 years ago

I think I managed to solve my own problem. For anyone else poking around, until inference gets further, add this to the docstring for each instance method:

@instance
@memberOf factoryName
simonwjackson commented 7 years ago

@odub can you give a full example of how you managed to get this to work?

odub commented 7 years ago

@simonwjackson Sure, I've a bunch in here: https://github.com/WeAreROLI/mpejs/blob/master/src/mpeInstrument/index.js

Output visible at mpe.js.org.