mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
Adding Model.modelName and Model.collection
See: https://github.com/Automattic/mongoose/blob/5c490f99e5d281e5303c023bade93a0624e5db66/lib/model.js#L62-L88
This commit is contained in:
Vendored
+9
@@ -2059,6 +2059,15 @@ declare module "mongoose" {
|
||||
*/
|
||||
new(doc?: Object): T;
|
||||
|
||||
/** The name of the model. */
|
||||
modelName: string;
|
||||
|
||||
/** Collection the model uses. */
|
||||
collection: Collection;
|
||||
|
||||
/** If this is a discriminator model, `baseModelName` is the name of the base model. */
|
||||
baseModelName: string;
|
||||
|
||||
/**
|
||||
* Finds a single document by its _id field. findById(id) is almost*
|
||||
* equivalent to findOne({ _id: id }). findById() triggers findOne hooks.
|
||||
|
||||
Reference in New Issue
Block a user