wirwolf / jsdoc-toolkit

Automatically exported from code.google.com/p/jsdoc-toolkit
0 stars 0 forks source link

Add @field tag to JSDoc #100

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently the @function tag can be used to force JSDoc to treat a property as a 
function, we 
should have a similar tag (@field) that will force JSDoc to treat a property as 
a field, even if its 
value is a function.  Here are a few use cases:

1. Using SproutCore get()/set() functions can behave as if they were properties:

Contact = SC.Record.extend({
  /** The first name of my contact */
  firstName: 'Charles',

  /** The last name of my contact */
  lastName: 'Jolley',

  /** The full name. */
  fullName: function() {
    return this.getEach('firstName', 'lastName').compact().join(' ');
 }.property()
});

2. More generically: a function you may set as a callback. 

/** Set this property to the function you want called when the event is 
triggered */
eventDelegate: function() {}

Original issue reported on code.google.com by cjol...@gmail.com on 21 Mar 2008 at 5:27

GoogleCodeExporter commented 8 years ago
This change was committed in revision 542, and will be in the next release.

Original comment by micmath on 21 Mar 2008 at 10:02