fro*_*ous 3 documentation shared-libraries code-documentation intellisense-documentati google-apps-script
我目前正在开发Google Apps脚本库,该库基本上将电子表格视为数据库对象。
当前,该库具有两个相同的功能,例如
/**
* Opens and creates a query object for a spreadsheet with the given url.
*
* @param {String} the url of the spreadsheet
* @return {SpreadsheetQuery_} a spreadsheet query object for the given spreadsheet
*/
function openByUrl(url) {
return new SpreadsheetQuery_(SpreadsheetApp.openByUrl(url));
}
Run Code Online (Sandbox Code Playgroud)
现在,对于这两个公共函数,生成的文档仅显示返回类型,而不显示参数或附带的说明。我假设这是一个Google问题,并没有真正打扰。
但是我的主要问题是,由于函数正在从私有函数实例化对象,因此如何获取自动文档以显示该对象上存在的方法。所有功能都将由对象提供,如果GAS可以在其上显示方法,那就太好了。
注意
这些方法都放在函数的原型上。例如。
SpreadsheetQuery_.prototype.from =函数(工作表){ 如果(_.isNumeric(sheet)){ .... }
谢谢。
为Google Apps脚本中的库提供支持的jsdoc变体不支持您要查找的级别的文档,仅支持第一级功能。有与此相关的未解决的错误报告,但Google没有回应。
您仍然可以编写jsdoc标记,并在Google基础架构之外生成文档。看看如何在google doc脚本中预览jsdoc注释,以获取有关如何预览jsdoc注释的一些指针。您可以获取输出jsdoc3
并将其发布在网站上,以将文档提供给社区。
其他相关/可能重复的帖子:
归档时间: |
|
查看次数: |
1342 次 |
最近记录: |