Javascript JSDoc";要求;出现两次?
“Requires”在输出文档中出现两次是否正常?如果没有,那么记录所需模块的正确方法是什么,以便它们只出现一次Javascript JSDoc";要求;出现两次?,javascript,jsdoc,Javascript,Jsdoc,“Requires”在输出文档中出现两次是否正常?如果没有,那么记录所需模块的正确方法是什么,以便它们只出现一次 //Imports import * as C from "../support/constants.js"; import Dispatcher from "../support/Dispatcher.js"; /** * @description The <strong>TextField</strong> class creates instance
//Imports
import * as C from "../support/constants.js";
import Dispatcher from "../support/Dispatcher.js";
/**
* @description The <strong>TextField</strong> class creates instances of either clickable and animatable text or static text accessible via the <strong>"element"</strong> property.
* @class
* @requires constants
* @requires Dispatcher
*
*/
class TextField extends Dispatcher {
/**
* @param {string} label - Textual content set as the <strong>"textContent"</strong> property of the TextField's HTMLElement.
* @param {string} id - DOMString representing the <strong>"id"</strong> property of the TextField's HTMLElement.
* @param {string} href - The URL assigned to the <strong>"href"</strong> property of the TextField's HTMLElement.
*
*/
constructor(label, id, href) {
super();
this._label = label;
this._id = id;
this._href = href;
this._init();
}
...
//导入
从“./support/constants.js”以C形式导入*;
从“./support/Dispatcher.js”导入调度程序;
/**
*@descriptionTextField类创建可单击和可设置动画的文本或可通过“元素”属性访问的静态文本的实例。
*@级
*@需要常量
*@需要调度程序
*
*/
类TextField扩展了Dispatcher{
/**
*@param{string}label-文本内容设置为TextField的HTMLElement的“textContent”属性。
*@param{string}id-DOMString表示TextField的HTMLElement的“id”属性。
*@param{string}href-分配给TextField的HtmleElement的“href”属性的URL。
*
*/
构造函数(标签、id、href){
超级();
这个._label=标签;
这个。_id=id;
这个。_href=href;
这个;
}
...
是从导入声明中获取它们并从您的注释中添加它们吗?如果您删除
*@requires常量
,会发生什么情况?我认为这也是问题所在,但如果我删除@requires常量
和@requires Dispatcher
,则“requires”根本不会出现在输出文档中。