On Wed, Mar 28, 2007 at 10:48:45AM -0700, Jake Devine wrote:
> Hi Anthony,
>
> Documenting a public property is the same as with a method. I'm not exactly
> sure of your syntax, but likely this would work:
>
> ---snip---
> /**
> * A sample public property
> * @type Number
> */
> some_public_property: 2,
> /**
> * A sample function
> * @param p something
> */
> a_func = function(p) {
> ---snip---
Yes indeed, in this kind of block properties are recognized in the same
way as functions. However, JSDoc only recognizes these kinds of blocks
in an assignment of an object definition to a function prototype, as follows:
Foo.prototype = {
/**
* Just an example.
*/
some_public_property: 2,
/**
* Here's an example method.
* @param p
*/
a_func: function(p) {
return null;
}
};
- Gabriel
|