JSDoc没有在文档中创建链接标签

问题描述

我有一个简单的类,我从index.js创建了一个实例。问题是,当我创建jsdoc时,链接标签Person不是URL,并且不可点击。如果我将类移到index.js,它将按预期工作。

index.js

/**
 * See {@link Person}
 */
const person1 = new Person({
  name: "John Doe",age: 30,});

utils.js

/**
 * Class to create a person object
 */
export class Person {
  /**
   *
   * @param {Object} personInfo information about the person
   */
  constructor(personInfo) {
    /**
     * @property {string} name Persons name
     */
    this.name = personInfo.name;
    /**
     * @property {string} age Persons age
     */
    this.age = personInfo.age;
  }

  /**
   * @property {Function} greet A greeting with the name and age
   * @returns void
   */
  greet() {
    console.log(`Hello,my name is ${this.name} and I am ${this.age}`);
  }
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)