TypeScript error when passing { _id: ids }
or { _id: arrayOfDocs }
to FilterQuery
#10826
Labels
typescript
Types or Types-test related issue / Pull Request
Milestone
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
TypeScript compilation error if
_id
is given an array of ids or documents inFilterQuery
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
It should pass compilation since mongoose transforms
FilterQuery
into{ _id :{ $in: ids} }
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Node.js: v14.15.5
Mongoose: v6.0.8
MongoDB: v4.4.3
The text was updated successfully, but these errors were encountered: