I have some TypeScript files:
MyClass.ts
class MyClass {
constructor() {
}
}
export = MyClass;
MyFunc.ts
I got this error when trying to include a npm debounce package in my project.
When I tried the accepted solution above I got an exception:
Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.
This ended up working:
import debounce from 'debounce'