编写关于类内部方法的jsdoc文档 [英] Writing jsdoc documentation on methods inside a class

查看:145
本文介绍了编写关于类内部方法的jsdoc文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Google Apps Script编写一些图书馆,并试图记录它们。我已经用下面的格式编写了一些类,并且类中的方法的注释并未显示在文档中:

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

this.myMethod = myMethod;
....

/ **
*此评论不会显示
* /

函数myMethod(){
...
}

}

关于如何实现这一点的任何想法? 解决方案

这个问题可能是重复的... 这个答案当然是



在Google Apps脚本中支持图书馆的jsdoc变体不支持您正在查找的文档,仅支持第一级函数。有一个相关的开放式错误报告,但Google没有回应。



您仍然可以编写jsdoc标记,并在Google基础结构之外生成文档。查看如何在Google文档脚本中预览jsdoc评论,了解如何预览您的jsdoc注释。您可以输出 jsdoc3 的输出并将其发布到网站上,以便将您的文档提供给您的社区。

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


I am writing some libraries in Google Apps Script and I am trying to document them. I have written some classes in the format below, and the comments of methods inside the class don't show up in the documentation :

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

   this.myMethod=myMethod;
   ....

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

   function myMethod(){
     ...
   }

}

Any idea on how I could achieve this ?

解决方案

This question may be a duplicate... this answer certainly is.

The jsdoc variant suported for libraries in Google Apps Script does not support documentation at the level you are looking for, only first-level functions. There is a relevant open bug report on this, but no response from Google.

You can still write your jsdoc tags, and generate your documentation outside of the Google infrastructure. Take a look at How to preview jsdoc comments in google doc scripts for some pointers on how to preview your jsdoc comments. You could take the output of jsdoc3 and publish it on a site to provide your docs to your community.

Other relevant / possible duplicate posts:

这篇关于编写关于类内部方法的jsdoc文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆