Schemas where index
is an object fail to compile in Mongoose 6.6.5
#12562
Labels
typescript
Types or Types-test related issue / Pull Request
Milestone
Prerequisites
Mongoose version
6.6.5
Node.js version
18.2.0
MongoDB server version
4.10.0
Typescript version (if applicable)
4.8.4
Description
I have a schema in my application that contains a
partialFilterExpression
inside an index. It was working fine until I upgraded Mongoose from6.6.2
to6.6.5
. Now it fails to compile with TS 2322 errors on all the properties. But it will work fine if I remove the partial index specification. This happens with another model that contains a text index too, where the index is specified likeindex: { text: true, ... }
.Steps to Reproduce
Try commenting/uncommenting the
index
specification on theemail
field.Expected Behavior
The schema should compile without errors.
The text was updated successfully, but these errors were encountered: