I am trying to typehint a bunch of javascript in Google Script, and I have gotten as far as trying this:
/**
* Get (named) range given by name
*
* @param {String} name
* @return {Range}
*
*/
function getRange(name) {
return SpreadsheetApp.getActiveSpreadsheet().getRangeByName(name);
}
Which displays well and gives the same typehint as the builtin getRangeByName, however it does not actually work, i.e. the auto-complete script editor does not autocomplete when I type something like getRange("hello").get"
, like it should. Should I be name spacing the Range
or am I doing something else wrong?
The current Google Apps Script IDE doesn't use local JSDOC to extend the autocomplete feature. Options:
Regarding using another IDE at this time there is a tool called CLASP that helps to download/upload script which make it possible to use other IDEs.
Resources
Related
Other related