To forward to commonjs modules, you may need to modify the definition file:
declare function PouchMiddleware(a: any): any; declare module "pouch-redux-middleware" { export = PouchMiddleware; }
Then import it like this:
import PouchMiddleware = require("pouch-redux-middleware");
Sucks. Someone might come up with a better answer.
I believe that my previous answer here only works for targeting ES6 and installing the module as "ES2015":
You will need to compile with --allowSyntheticDefaultImports to make it work, and then change the interface in the definition file to a function:
declare function PouchMiddleware(a: any): any; declare module "pouch-redux-middleware" { export = PouchMiddleware; }
A similar situation occurs with the reaction library. More details here ...
source share