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

199
Vistas
Using Typescript Declaration Files to Enable Code Completion For Modules With Specific Extension

ErrorGamer2000 here. I am looking for a way to use a global .d.ts file to enable vscode (and other code editors) code completion and type sensing for files matching a specific path pattern. Something that could usually be don for intellisense of imports as so:

declare module "path/*.js" {
  export default async function (param0: TypeOfParam);
}

Would this enable vscode type sensing for the files that match that pattern? for instance, say I make a new file named path/file.js and type

export default async function(param0) {
  //...
}

I need vscode to be able to detect the type of param0 based off of the global .d.ts file so that code completion can be used. If this would not work, is there a way to do this without adding a type to the global scope with declare global {} and using the JSDoc @type?

about 4 years ago · Juan Pablo Isaza
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