fix Model.remove, deleteOne and deleteMany definitions

This commit is contained in:
Vladimir Bloshchitsyn
2018-03-03 20:41:56 +03:00
parent ce73af4e00
commit c73250cb66
+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).