参见示例我尝试使用自动完成和文档代码,但@param信息被忽略 - 如何正确执行jsdoc?
/**
* @constructor
*/
function WhiteClass() {
this._rgb = [1.0, 1.0, 1.0]
}
/**
* @constructor
*/
function ColorClass() {
}
ColorClass.prototype = {
constructor: RedClass,
/**
* @param {WhiteClass} whiteInstance
*/
attachWhite: function (whiteInstance) {
this._white = whiteInstance;
/** @type {WhiteClass} */
this._white2 = whiteInstance;
},
otherAction: function() {
// this._white. <- autocompletion not works since type is any @param is ignored - how to make @param working?
// this._white2. <- autocompletion works but @param is ignored only @type is used
}
}