My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
javascriptCommentReference  

jsdoc, 注释规范
Updated Feb 4, 2010 by jasonyi...@gmail.com

本开源项目采用jsdoc_toolkit工具作为api doc生成工具,该工具是注释驱动的,也是googlecode下的一个开源项目( http://code.google.com/p/jsdoc-toolkit/ )。 下面是js代码的注释规范中文说明:

@author:作者

@argument:参数

@augments:参数

@borrows 从另一个类中转移、继承过来的

@class: 类

@constant:常数

@constructor:构造

@constructs: 构造

@default:默认值

@deprecated: 不推荐,说明使用一个变量已不再支持

@description:说明

@example :范例

@extends: 扩展 ,继承

@field:变量(非功能)

@fileOverview :整个文件信息

@function: 功能 (表示该变量指向一个功能)

@inner || @private : 私有,内部

@ignore: 忽视 (文档生成的式后也将忽视这个变量)

@event:事件

@version:版本

@type:类型 描述预期的类型变量的值或返回值的函数

@throws :可能抛出的异常

@static: 静态,访问该变量不需要实例

@since: 自 (表明某属性特征,是在什么版本之后才有的)

@see: 描述相关的资源

@scope ||@lends: 作用域

@return ||@returns

@requires: 描述必须需要的资源

@public: 说明内在变量是公开的

@property : 属性

@param:参数

@namespace: 命名空间

另外,我已经在该项目的wiki建议作者增加 @config 和 @override 这两个注释标签

Powered by Google Project Hosting