gpt4 book ai didi

google-apps-script - 编写有关类中方法的 jsdoc 文档

转载 作者:行者123 更新时间:2023-12-04 18:20:56 34 4
gpt4 key购买 nike

我正在用 Google Apps Script 编写一些库,我正在尝试记录它们。我用下面的格式编写了一些类,类中方法的注释没有显示在文档中:

/**
* My comments here
*/
function MyBeautifulObject(){

this.myMethod=myMethod;
....

/**
* This comment doesn't show up
*/

function myMethod(){
...
}

}

关于如何实现这一目标的任何想法?

最佳答案

这个问题可能是重复的... this answer certainly is .

支持 Google Apps Script 中的库的 jsdoc 变体不支持您正在寻找的级别的文档,仅支持第一级功能。有一个relevant open bug report对此,但谷歌没有回应。

您仍然可以编写 jsdoc 标签,并在 Google 基础架构之外生成文档。看看How to preview jsdoc comments in google doc scripts有关如何预览 jsdoc 注释的一些指示。您可以获取 jsdoc3 的输出并将其发布在网站上,以将您的文档提供给您的社区。

其他相关/可能重复的帖子:

  • Creating a namespace-like organization in a google apps script library
  • Google Apps Script Auto Generated Library Documentation
  • 关于google-apps-script - 编写有关类中方法的 jsdoc 文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14893927/

    34 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com