For the simple backbone model, you'd document the object that's being returned. In YUIDoc, it would be referred to as a "class". It's also instantiable (you use the "new" keyword with it) and it extends some other object. Therefore, you'd start like this:
/**
* A customized Backbone.Model that represents...
* @class MyModel
* @constructor
* @extends Backbone.Model
*/
return Backbone.Model.extend({
The default attributes foo, bar, and baz, you could document with @attribute. Attributes are actually a pretty specialized concept in YUI, but when you step back a little, Backbone Model attributes are conceptually similar. So I think it makes sense to borrow the terminology. Otherwise, you could use @property.
/**
* Indicates that...
*
* @attribute rendered
* @default ''
* @type String
*/
foo: ''
For a constructor that accepts a settings object, AND that settings object has certain default values, see the source for how Y.Router is documented: http://yuilibrary.com/yui/docs/api/files/app_js_router.js.html#l38
For standard Backbone parameters such as events and model, use @property. For events, you will want to describe in plain English which event listeners it sets up.
Good luck, and if you use IRC, feel free to chime in #yui on freenode.net if you have YUIDoc questions!