isDeleted func name (#35282)

This commit is contained in:
Kaipeng Lu
2019-05-13 16:03:34 -07:00
committed by Nathan Shively-Sanders
parent 10c7136095
commit 2c7b9c4735
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -3230,9 +3230,9 @@ declare module "mongoose" {
model<T extends Document>(name: string): Model<T>;
/** Override whether mongoose thinks this doc is deleted or not */
isDeleted(isDeleted: boolean): void;
$isDeleted(isDeleted: boolean): void;
/** whether mongoose thinks this doc is deleted. */
isDeleted(): boolean;
$isDeleted(): boolean;
/**
* Removes this document from the db.
+2 -2
View File
@@ -2017,8 +2017,8 @@ const addFieldsAgg: mongoose.Aggregate<any> = aggregatePrototypeGraphLookup.addF
MyModel.findById('foo').then((doc: mongoose.Document) => {
const a: boolean = doc.isDirectSelected('bar');
const b: boolean = doc.isDeleted();
doc.isDeleted(true);
const b: boolean = doc.$isDeleted();
doc.$isDeleted(true);
});
MyModel.translateAliases({});