我正在尝试使用JSDoc-toolkit记录我的代码。我的代码以自执行匿名函数为开头。我该如何记录这个呢?我已经花了一整天的时间在这上面。由于JS Docs不知道该如何处理匿名函数闭包中的内容,因此它无法识别其中的任何内容。它会出现错误并且我的注释也无法识别。
我的代码大致如下:
/**
* @fileoverview BLA BLA BLA
*/
/**
* This is where I don't know what to put.
*/
(function () {
"use strict";
/** or here */
var stlib = function (param, param, param) {
/** or here */
var share = {
/** or here */
config: {
button: DOM Element,
property: blablabla
},
init: function () { ...some init code here}
};
share.init();
};
widgets.add("share", stlib);
}());
谢谢!