ExtraBB / typegoose-cursor-pagination

A mongoose plugin for cursor pagination with typegoose support
MIT License
17 stars 10 forks source link

Mongoose forcing update and type error #19

Closed mateusbarros92 closed 3 years ago

mateusbarros92 commented 3 years ago

Mongoose is forcing me to update its version (See the screenshot)

Screenshot from 2021-01-07 09-07-34

I updated the mongoose version and i had a type error with this lib

Screenshot from 2021-01-07 09-09-53

Screenshot from 2021-01-07 09-11-09

This error don't extends mongoose types and show me errors when i try to use mongoose functions

Can you fix it?

ExtraBB commented 3 years ago

It looks like you updated typegoose to a higher version, for which you needed to upgrade mongoose as well. (https://typegoose.github.io/typegoose/docs/guides/error-warnings-details#mongoose-version-e001)

The easiest solution would be to downgrade typegoose back to the version that comes with this package. This should fix the type issues that you're having.

If you really need the higher typegoose version, you can try to fix the issues and submit a pull request with the fixes and dependency upgrades.