New FilterQuery type (from 8.6.0) disallows $expr at the query root (type error) #14841
Closed
2 tasks done
Labels
typescript
Types or Types-test related issue / Pull Request
Milestone
Prerequisites
Mongoose version
6.8.0
Node.js version
20.15.0
MongoDB server version
7.0.9
Typescript version (if applicable)
5.5.4
Description
Starting from mongoose 8.6.0, this raises a type error:
I think its related to the changes from #14764.
Steps to Reproduce
Install mentioned versions and create a file with the snippet.
Expected Behavior
No type errors, as its a valid MongoDB query.
The text was updated successfully, but these errors were encountered: