mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
add missing field to mongoose document (#39226)
This commit is contained in:
committed by
Andrew Branch
parent
ed4c578fb0
commit
c35210fe19
Vendored
+2
@@ -1421,6 +1421,8 @@ declare module "mongoose" {
|
||||
isNew: boolean;
|
||||
/** The documents schema. */
|
||||
schema: Schema;
|
||||
/** Empty object that you can use for storing properties on the document */
|
||||
$locals: { [k: string]: any };
|
||||
}
|
||||
|
||||
interface MongooseDocumentOptionals {
|
||||
|
||||
@@ -732,6 +732,7 @@ mongoose.plugin<PluginOption>(AwesomeLoggerPlugin, {modelName: 'Executive', time
|
||||
*/
|
||||
var doc = <mongoose.MongooseDocument> {};
|
||||
doc.$isDefault('path').valueOf();
|
||||
doc.$locals.field = 'value';
|
||||
const docDotDepopulate: mongoose.MongooseDocument = doc.depopulate('path');
|
||||
doc.equals(doc).valueOf();
|
||||
doc.execPopulate().then(function (arg) {
|
||||
|
||||
Reference in New Issue
Block a user