Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

353
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda