是否可以让 AppsScript 的脚本编辑器中的自动完成功能在自定义 类 上工作?

Is it possible to get the autocomplete functionality in AppsScript's script editor to work on custom classes?

如果我在 AppScript 中构造一个 class 并添加一个方法,当我在该 class 的实例后键入一个句点时,是否可以使自动完成功能起作用?

Google 的 documentation 说 "If you want your library users to make use of Script Editor autocomplete and the automatically generated documentation, you must have JSDoc style documentation for all your functions."

我不确定这是否可行,或者我是否错误地实现了 JSDoc 样式文档。

/*
* @constructor
*/
function MyConstructor(){
  this.sayHello = function(){
    return "Hello World!"
  }
}

function run(){
  var foo = new MyConstructor();
  //Is it possible to see autocomplete with "sayHello()" 
  //after typing this period
  var hello = foo.
}

不幸的是,jsdoc 仅适用于应用程序脚本中的顶层函数,因此使用 this.method = function() {} 声明的方法既不会出现在生成的文档中,也不会出现在自动完成中。很烂,但就是这样。

您可以和其他人一起主演这个 this apps script issue

可是开了快2年了,没看到有什么动静。