I am defining four global variables from a forEach loop using a line similar to this:
global[name] = buffer
with buffer being the type from node.js
and currently have the very ugly way to get my intellisense for it by having this after the loop:
// next line only so intellisense works, ALWAYS comment out before running
const btMapProvinces = Buffer.alloc(1), btMapTerrain = Buffer.alloc(1), btMapRivers = Buffer.alloc(1), btMapHeightmap = Buffer.alloc(1);
Now as i learned about how to use JSDoc to get Intellisense for arguments in modules i was sure i could use that to get Intellisense for my variables instead, but after reading through the whole documentation i can’t seem to get it working.
My current attempt looks like this:
/**
* @var {Buffer} btMapProvinces
* @var {Buffer} btMapTerrain
* @var {Buffer} btMapRivers
* @var {Buffer} btMapHeightmap
*/
but it just doesn’t work at all, no matter if it is right before the global[name] = buffer line, at the beginning of the script, or after the forEach…
