对于这样的功能...
function example() {
var X = 100;
...
var Y = 'abc';
...
return Z;
}
我需要解释一些局部变量的目的。添加这样的描述...
function example() {
/**
* @description - Need to explain the purpose of X here.
*/
var X = 100;
...
/**
* @description - Need to explain the purpose of Y here.
*/
var Y = 'abc';
...
return Z;
}
...似乎并没有被抓住JS Doc v3.4.0
。
正确的语法是什么?
PS我的一些用例要求多行注释。
似乎JS Docs会忽略“块”中的注释(例如,类,函数等)。我试过了...
@description
@inner
@instance
@member
@memberof
@name
@summary
...和别的。我无法让他们任何人生成文档。在整个JS Doc示例中,他们使用普通的JS注释进行此类操作。
我的结论是,对此没有官方的JS Doc语法。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句