Reactjs 错误:无法分析"&引用;:意外令牌(JSDoc)

Reactjs 错误:无法分析"&引用;:意外令牌(JSDoc),reactjs,ecmascript-6,jsdoc,Reactjs,Ecmascript 6,Jsdoc,我已经根据JsDoc的文档定义了类、属性和方法,但是我得到的错误是:无法解析“/somePath”:意外的令牌。我的类定义如下:- /** * class representing Lab testResults * @param {object} props: contain all the property */ class LabTestResult extends Component { constructor(props) { super(props);

我已经根据JsDoc的文档定义了类、属性和方法,但是我得到的错误是:无法解析“/somePath”:意外的令牌。我的类定义如下:-

/**
 * class representing Lab testResults
 * @param {object} props: contain all the property
 */
class LabTestResult extends Component {
    constructor(props) {
        super(props);
        this.state = {
            loading: true,
        }
        this.collapseButton = this.collapseButton.bind(this);
    }
    state = {
        open: false,
    };
}

为什么我会犯这个错误?我怎样才能解决这个问题?请帮助我。

如果这是香草2015课程,这里有一个样本(来自文档)。我认为“类”注释不需要参数。无论如何,这就是它所说的“记录一个简单的es2015类”的方式。请注意,参数位于构造函数之上,而不是类。我从来都不是JSDoc向导,但这看起来不正确

从这里开始:


state={open:false}在ES6中无效。我不希望jsdoc支持每一个实验特性。
/**
 * Class representing a dot.
 * @extends Point
 */
class Dot extends Point {
    /**
     * Create a dot.
     * @param {number} x - The x value.
     * @param {number} y - The y value.
     * @param {number} width - The width of the dot, in pixels.
     */
    constructor(x, y, width) {
        // ...
    }

    /**
     * Get the dot's width.
     * @return {number} The dot's width, in pixels.
     */
    getWidth() {
        // ...
    }
}