Merge pull request #23777 from vologab/master

fix Model.remove, deleteOne and deleteMany definitions
This commit is contained in:
Armando Aguirre
2018-03-05 14:55:57 -08:00
committed by GitHub
+4 -3
View File
@@ -7,6 +7,7 @@
// Alorel <https://github.com/Alorel>
// jendrikw <https://github.com/jendrikw>
// Ethan Resnick <https://github.com/ethanresnick>
// vologa <https://github.com/vologab>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -2626,9 +2627,9 @@ declare module "mongoose" {
callback?: (err: any, res: T) => void): Promise<T>;
/** Removes documents from the collection. */
remove(conditions: any, callback?: (err: any) => void): Query<void>;
deleteOne(conditions: any, callback?: (err: any) => void): Query<void>;
deleteMany(conditions: any, callback?: (err: any) => void): Query<void>;
remove(conditions: any, callback?: (err: any) => void): Query<mongodb.WriteOpResult['result']>;
deleteOne(conditions: any, callback?: (err: any) => void): Query<mongodb.WriteOpResult['result']>;
deleteMany(conditions: any, callback?: (err: any) => void): Query<mongodb.WriteOpResult['result']>;
/**
* Same as update(), except MongoDB replace the existing document with the given document (no atomic operators like $set).