Stopped document interface from extending mongoose Document.
Based on Mongoose TypeScript documentation it is advised that document interface not extend Document. Using extends Document makes it difficult for Mongoose to infer which properties are present on query filters, lean documents, and other cases.
So, without extending Document mongoose handles the type casting for models.
Fixes #366
Stopped document interface from extending mongoose Document.
Based on Mongoose TypeScript documentation it is advised that document interface not extend
Document
. Usingextends Document
makes it difficult for Mongoose to infer which properties are present on query filters, lean documents, and other cases.So, without extending
Document
mongoose handles the type casting for models.