Q:

Module '"mongoose"' has no exported member 'PaginateResult'

I can't seem to add mongoose-paginate types to my angular-cli project setup with Angular 4. Webpack is throwing 
import {PaginateResult} from "mongoose";

...

getAll(page: number): Observable<PaginateResult<Operation>> {
    ...
}

Ctrl-clicking PaginateResult in Webstorm opens the correct file definition. The types are correctly installed in the node_modules/@types directory (I installed them using npm install --save @types/mongoose-paginate).
However, webpack is throwing:
ERROR in /Users/geoffroy/dev/git/ezvat/client4/src/app/components/operations/operation.service.ts (8,9): Module '"mongoose"' has no exported member 'PaginateResult'.

What is going on ?

A:

Import the mongoose-paginate module
import * as mongoosePaginate from 'mongoose-paginate';

It seems that the correct namespaces are not found without importing it. I found it using the test in the DefinitelyTyped repo https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/mongoose-paginate/mongoose-paginate-tests.ts

