JSDoc用于在Google表格自动填充下拉列表中显示可选参数 [英] JSDoc for showing optional arguments in Google Sheets autocomplete dropdown
问题描述
我想记录一个自定义函数(在Google Sheet中自动完成),该函数带有可选参数,类似于 WEEKDAY
函数(下面的自动完成)。
这不是副本。如您所见,我特别询问的是可选参数,我已经成功使自动完成功能的其他功能起作用。
Google Apps脚本目前在其JSDoc中不支持可选参数。
I'd like to document (in the Google Sheet autocomplete) a custom function with optional arguments, similar to the WEEKDAY
function (autocomplete below).
The JSDoc spec on optional arguments does not work. Google does not seem to document this anywhere. How can I create a function with the same visual treatment (both in the argument description and the Example) that Google has?
/**
* Summary of function
* @param {"example"} arg Argument description
* @param {"optional"} opt_arg This argument is optional
* @return {String} Return value description
* @customfunction
*/
function JSDOC(arg, opt_arg) {
return
}
Generates this autocomplete:
This is not a duplicate. I'm specifically asking about optional arguments, as you can see, I've successfully gotten the autocomplete's other features working.
Google Apps Script doesn't support optional params in their JSDoc at this moment.
这篇关于JSDoc用于在Google表格自动填充下拉列表中显示可选参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!