Re: [Jsdoc-user] public properties?
Status: Inactive
Brought to you by:
mmathews
From: Michael M. <mi...@gm...> - 2007-03-27 22:43:57
|
Hi Anthony, I'm afraid I don't understand your example. Perhaps you trimmed too much, because the Foo.bar code you gave isn't valid JS. Did you mean: Foo = { bar: { some_public_property: 2, a_func: function(p) { } } }; Foo.bar.some_public_property = 3; I can't be certain of JSDoc 1.x (perhaps Gabriel will follow up) but in JSDoc-2 one way to document the above would be like so: /** * Container object. * @namespace */ Foo = { /** * Just an example. * @namespace * @property {number} some_public_property */ bar: { some_public_property: 2, /** * Here's an example method. * @method * @param p */ a_func: function(p) { } } }; This would add all your objects to the output. I can post an example of this on the web if you like and you can try it yourself. Regards, Michael On 27 Mar 2007, at 22:58, Anthony Ettinger wrote: > Is it bad form to have a public property? > I'm not seeing any way to note this in JSDoc. > > ie: > > Foo.bar: { > some_public_property: 2, > a_func: function(p) { > > } > } > > > Such that I can set it with: > > Foo.bar.some_public_property = 3; > > Seems we need a JSDoc "@public" notation. > > > > -- > Anthony Ettinger > Ph: 408-656-2473 > http://chovy.dyndns.org/resume.html > http://utuxia.com/consulting > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Jsdoc-user mailing list > Jsd...@li... > https://lists.sourceforge.net/lists/listinfo/jsdoc-user |