Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

346
Views
How to make intellisense work in Visual Code, when using a globally exposed library?

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.

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!