Open bneigher opened 1 year ago
We have the following types defined
export interface PaginatedModel<T extends Document> extends Model<T> {
paginate(paginantionOptions: any, populate?: any): Promise<PaginationResult<T>>;
}
and
export interface PaginationResult<T> {
hasPrevious?: string;
previous?: string;
hasNext?: string;
next?: string;
results: T[];
}
Then where you declare the type inside your service use:
private readonly vehicleModel: PaginatedModel<VehicleDocument>
I hope this helps, the main project is no longer in development as I just noticed this by chance.
From the instructions, it's not exactly clear how to use this with a dependency injection based codebase.. For example:
the model
the module
the service
anyone able to lend some advice?