Reputation: 5011
Let's say I have the following TypeScript file:
import { X, Y, Z } from "./abc";
console.log("Done!");
How do I get TypeScript to ignore the import statement (I.E: remove it) so the compiled result looks like this:
console.log("Done!");
Upvotes: 2
Views: 14342
Reputation: 2373
Create a global.d.ts and add
declare module '*';
It automatically makes all js modules any while ts modules keep working as intended.
Now you are free to import any js modules without typings!
Upvotes: 13