I’m building a Google Apps Script library and I’d like to expose some constants as a nested object.
var CONFIG = {
LEVEL0: {
LEVEL1_A: 'A',
LEVEL1_B: 'B'
}
};
When I use this library in another project, autocomplete detects CONFIG and CONFIG.LEVEL0, but not CONFIG.LEVEL0.LEVEL1_A and CONFIG.LEVEL0.LEVEL1_B.
Is there a way to make the Apps Script editor at script.google.com provide autocomplete for deeply nested constants in a library? Or is this simply a limitation of the Apps Script autocomplete engine?
", I.E.,"LEVEL1_A". If that doesn't work, try adding a JSDoc comment for the type of your variable. See jsdoc.app/tags-type.CONFIG.LEVEL0.LEVEL1_Ato thisCONFIG.LEVEL0_LEVEL1_A.