Open
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Mongoose version
8.10.0
Node.js version
22.8.0
MongoDB server version
6.12.0
Typescript version (if applicable)
5.4.5
Description
When omiting the versionKey from a schema the __v property is still present in typescript.
Steps to Reproduce
Create a schema and notice the __v property still present after omitting versionKey
const documentSchema = new Schema({}, {strict: false, versionKey: false})
export const DB = mongoose.model("cart", documentSchema, "cart");
const b = await DB.findOne().lean()
b?.__v
Expected Behavior
Expect __v to be removed from typescript types.