mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
Merge pull request #23777 from vologab/master
fix Model.remove, deleteOne and deleteMany definitions
This commit is contained in:
Vendored
+4
-3
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user