How to correctly type custom plugins? Also unable to register previously working plugins since v6.5.2 #12454
Closed
1 task done
Labels
help wanted
help
This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary
typescript
Types or Types-test related issue / Pull Request
Milestone
Prerequisites
Mongoose version
6.6.1
Node.js version
16.14.0
MongoDB version
5.0.5
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
11
Issue
My custom plugin used to be typed correctly up to version
6.5.1
where I'm basically following this guide. However, starting from v6.5.2 to the current v6.6.1, I get the following:I was also unable to register the mongoose-unique-validator plugin and being shown the following error in my IDE:
I can't seem to find any info in the docs regarding how to correctly type my custom plugin nor am I sure if this is a bug or a breaking change.
The text was updated successfully, but these errors were encountered: