I'm using some library within my React object, that is globally exposed on the window object. It's loaded from index.html in the public directory(had to do this for complicated reasons, like usage of a Webworker and Web Assembly).
Within my React app, I simply access the object like this:
const myInstance = new window.MyClass()
It all works fine, except for one problem: Visual Code has no idea what this object is, and therefore no intellisense is available. It just appears as "any". The library is documented with JsDoc, which I would like to utilize.
Any idea how this can be done? Is there a way to somehow tell the IDE: "this object I'm referring to, actually comes from here"?
I'll point out that this library is under my control(not some NPM module), so I can make any change there that is needed. Currently, it exposes itself both via window and export default.