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?