This is feature that other Mongoose type plugins support, allowing modifying a mongoose object other than the default, with syntax like this:
const mongoose = require("mongoose");
const Int32 = require("mongoose-int32").loadType(mongoose);
The way that some others like this implement is a breaking change, because you have to call loadType() to select which Mongoose instance you want to attach to. If no instance is provided, the default is attached to.
This is feature that other Mongoose type plugins support, allowing modifying a mongoose object other than the default, with syntax like this:
The way that some others like this implement is a breaking change, because you have to call
loadType()to select which Mongoose instance you want to attach to. If no instance is provided, the default is attached to.