开发者

Javascript methods, classes and events

开发者 https://www.devze.com 2022-12-27 18:37 出处:网络
how should I document this piece of code: // Is this class? colors = { // Is this method? \"red\" : function() {

how should I document this piece of code:

// Is this class?
colors = {

  // Is this method?
  "red" : function() {
     // Do something...
  }

  // Still method?
  "black开发者_开发知识库" : {

     // So what is this?
     "black-1" : function() { /* Do something */ }

   }

}

I am using YUI Doc.

These tags are available

  • @module
  • @class
  • @method
  • @event
  • @property


From using YUI, its docs, and a quick skim of the YUI Doc explanation page, it's my impression that it assumes that you're using the module pattern.

You don't have a module.

  • colors => @static @class
  • red => @method
  • black => @property
  • black-1 => "internal" (ish) so it's not anything under this taxonomy.
0

精彩评论

暂无评论...
验证码 换一张
取 消