我有一个基于Backbone boilerplate的项目,我希望用最近的jdoc-toolkit
进行记录虽然我无法生成除空_global类
之外的任何内容代码示例:
/**
* This is a root model for DLClass
* @module models/DLClass
*/
define([
'underscore',
'backbone'
], /** @lends DLClass */ function (_, Backbone) {
/**
* This is a root model for DLClass
* @class DLClass
* @constructor
* @return Session Object
*/
var DLModel = Backbone.Model.extend({
/** @lends DLClass.prototype */
/**
* Generic tap event
* @param touchEvent
*/
onTap: function (touchEvent) {
},
答案 0 :(得分:3)
尝试添加@namespace
以让JSDoc知道查看模块的内容。并使用@name
定义您的模块及其功能。
/**
* This is a root model for DLClass
* @module models/DLClass
* @namespace
*/
define([
'underscore',
'backbone'
], /** @lends DLClass */ function (_, Backbone) {
/**
* This is a root model for DLClass
* @class DLClass
* @module models/DLClass
* @name DLClass
* @constructor
* @return Session Object
*/
var DLModel = Backbone.Model.extend({
/** @lends DLClass.prototype */
/**
* Generic tap event
* @name DLClass.onTap
* @function
* @param touchEvent
*/
onTap: function (touchEvent) {
},