I asked a question and through the answer found I had not asked the right question!
Say LibraryFoo
is a library and if I use that elsewhere as a library, I get type completion. For example, if I have
/**
* Lorem ipsum
*
* @return {Object[]}
*
*/
function bar() {}
in LibraryFoo
and if in the other Google Script I type LibraryFoo.bar().
I get suggestions for an array like forEach
and map
. However, if instead I have
/**
* Lorem ipsum
*
* @return {Sheet}
*
*/
function barring() {}
and I type LibraryFoo.barring().
I do not get suggestions like getRange
or getMaxColumns
. I know that using clasp and local IDE might make more sense, but one of two seems to be the case:
- I am using the wrong name/reference (though when Google's own functions are typed, they simply say "Sheet". Is the source code for e.g. SpreadsheetApp available? That would maybe be a hint, or not be in proper GAS).
- This is not possible, because Google have done something I/we cannot do.
Regardless, despite searching and trying different ways to namespace the Sheet
reference, I have not found out whether it is 1. or 2. (or something else!).
[EDIT: I have made a feature request to Google, still unsure which of 1./2./something else it is]