I have a piece of code that runs on the browser. There's a library loaded from a CDN that puts some variables on the global scope. How can I document the type of that variable?
For example
index.hmtl => puts globalVariable
on the global scope
...
<script src="//cdn.library.com/library.js"></script>
...
index.js => uses globalVariable
/**
* @type {SomeType} globalVariable
*/
const foo = globalVariable()
Something like that so I can specify the type of globalVariable
. Is that possible?