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
Original issue reported on code.google.com by
cjol...@gmail.com
on 21 Mar 2008 at 5:27