Reputation: 113
So I want to import a js module in my ts app.
Is there a way to do this without making a d.ts file or if not how to declare it as any in the d.ts file?
I am currently just ignoring this error with //@ts-ignore.
Thanks!
Upvotes: 0
Views: 522
Reputation: 8718
There are two cases here:
import(...)
availableconst module = (await import('module')) as any;
require(...)
const module = require('module') as any;
Upvotes: 1