The Model to store
The Class to store
Optional
options: { Overwrite existingMongoose or existingConnection
Optional
Optional
disableOptional
existingOptional
existingclass ClassName {}
const schema = buildSchema(ClassName);
// modifications to the schema can be done
const model = addModelToTypegoose(mongoose.model("Name", schema), ClassName);
Generated using TypeDoc
Add a Class-Model Pair to the Typegoose Cache This can be used to add custom Models to Typegoose, with the type information of "cl" Note: no guarrantee that the type information is fully correct when used manually