我知道这是一个愚蠢的问题,但我刚刚开始使用 jsdoc,并且在尝试生成 doc 文件时遇到问题。
我遵循了一些在网上找到的示例,这些示例似乎本质上是相同的,但由于某种原因,我无法为我想要记录的变量之一生成文档。
这是我的代码。
/**
*@fileOverview mainController ' main controller file'
*@param Controller here
*/
function (jQuery, Controller, JSONModel, Filter){
.....
}
第一部分 @fileOverview 有效,而 @param 无效,index.html 文件不显示任何有关它的信息,而且我没有看到任何错误。 我肯定在这里做错了什么,但我不知道是什么
最佳答案
试试这个:
/**
* @fileOverview mainController ' main controller file'
* @param {object} Controller here
*/
function (jQuery, Controller, JSONModel, Filter){
.....
}
(注意间距变化)
关于javascript - 如何在jsdoc中使用@param,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43457215/