Property 'options' does not exist on type '(schema: Schema<any, Model<any, any, any, any>, any, any>) => void'
kerolloz opened this issue · 5 comments
kerolloz commented
ypicard commented
Will look today.
ypicard commented
LGTM.
rahmanrezaee commented
add this line in model file
ShiftsSchema.plugin(paginate);
// make a interface
interface ShiftsDocument extends mongoose.Document { }
// user generic <ShiftsDocument, mongoose.PaginateModel<ShiftsDocument>>
export default mongoose.model<ShiftsDocument, mongoose.PaginateModel<ShiftsDocument>>("shifts", ShiftsSchema);