Re: [Jsdoc-user] Hiding constructor details
Status: Inactive
Brought to you by:
mmathews
From: Gabriel R. <gab...@gm...> - 2007-03-28 20:45:48
|
On Mon, Mar 26, 2007 at 03:37:31PM +0100, Bruce Boughton wrote: > Gabriel Reid wrote: > >Could you provide a bit more explanation, or another example (pointing > >out the information that you want to be hidden, and where you're putting > >the @ignore or @private tag)? > > > My previous example may not have worked as I modified it a bit to > anonymise it. > > I have modified my code slightly, which I show below. This correctly > hides the constructor, but it has the side-effect of hiding the class > description. I appreciate JavaScript does not make it easy for JSDoc by > combining the class declaration and constructor into one object! > > My constructs may look a little strange. I declare privileged functions > inside the _wbinit method (called by the ctor) which have access to > private member variables. If I attach JSDoc documentation directly to > these JSDoc does not see it (because they are inside the _wbinit > method), so I am aliasing them from methods declared after _wbinit, > which are documented. > I've looked at this problem a bit, and as it stands, I'd say that it's not really possible to achieve exactly what you want to do with JSDoc (hiding constructor details while showing class information). You could play around a bit more with things as you've done to try to trick JSDoc into providing what you want, but that also goes against the whole idea of JSDoc (it's supposed to reduce your work, not increase it). - Gabriel |