I'm attempting to write a typing definition for pouch-redux-middleware, which exports a single function:
import PouchMiddleware from 'pouch-redux-middleware'
PouchMiddleware({...})
Here is the typings definition I have:
interface PouchMiddleware {
(a: any): any;
}
declare var PouchMiddleware: PouchMiddleware;
declare module "pouch-redux-middleware" {
export = PouchMiddleware;
}
This results in the error:
Module '"pouch-redux-middleware"' has no default export.
What is the correct way to declare this?