You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Property 'paginateSubDocs' does not exist while paginate works correctly when using mongoose-paginate-v2 in a typescript project
To Reproduce
Add mongoose-paginate-v2 to a typescript project
Add it as a plugin to one of the schema
Add PaginateModel as an extenion of your model
Call paginateSubDocs (For exemple User.paginateSubDocs(...))
Expected behavior
paginateSubDocs should be a recognized method of type PaginateModel
Additional context
I think the solution is to add the method declaration in the file index.d.ts inside of the interface paginateModel in line 102 because the only declared method here is paginate
Describe the bug
Property 'paginateSubDocs' does not exist while paginate works correctly when using mongoose-paginate-v2 in a typescript project
To Reproduce
Add mongoose-paginate-v2 to a typescript project
Add it as a plugin to one of the schema
Add PaginateModel as an extenion of your model
Call paginateSubDocs (For exemple User.paginateSubDocs(...))
Expected behavior
paginateSubDocs should be a recognized method of type PaginateModel
Additional context
I think the solution is to add the method declaration in the file index.d.ts inside of the interface paginateModel in line 102 because the only declared method here is paginate
The text was updated successfully, but these errors were encountered: