Typescript error: 'Type instantiation is excessively deep and possibly infinite' for findOneAndUpdate (similar to issue 10189) #10647
Labels
typescript
Types or Types-test related issue / Pull Request
Milestone
I would like to report a potential bug. I experienced this compilation error after updating my current Mongoose version from 5.12.8 to 5.13.8
Similar to #10189
Typescript: 4.2.4
Mongoose: 5.13.8
Node: 14.15.4
MongoDB: Azure Cosmos DB
Schema definition (some omissions for brevity):
Snippet of the code that results in the Typescript compilation error:
I did try one of the workarounds suggested in issue 10189. I made IRegistrationDocument no longer extend mongoose.Document. However that didn't fix that compilation error. It actually seemed to confuse Typescript when trying to configure the model (attached screen shot showing this).
#
Any suggestions?
Thanks,
Kelly
The text was updated successfully, but these errors were encountered: