您好我的JSDoc无法接受我的部分代码。代码使用webpack编译好,但jsdoc给了我一个错误。
ERROR: Unable to parse <path>\Command.js: Unexpected token =
JSDoc抱怨的代码
/**
* Base command.
* @class
* @abstract
* @memberOf editor
*/
class Command {
// This is what jsdoc complains about.
/**
* @type {number}
* @private
* @static
*/
static _id = -1;
constructor(){
/* ... */
}
/* ... */
}
JSDOc conf
{
"tags": {
"allowUnknownTags": true,
"dictionaries": ["jsdoc","closure"]
},
"source": {
"includePattern": ".+\\.js(doc|x)?$",
"excludePattern": "(dist|node_modules|web_modules|webpack.config|docs)"
},
"plugins": ["node_modules/jsdoc-babel"],
"babel": {
"extensions": ["jsx", "es6"],
"presets": ["env", "es2015", "stage-0","react"],
"plugins": [
"transform-object-rest-spread"
]
},
"templates": {
"cleverLinks": false,
"monospaceLinks": false
}
}
非常感谢任何帮助。