mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 21:10:23 +00:00
mongoose: Add replaceOne and updateOne to MongooseDocument (#33814)
This commit is contained in:
Vendored
+9
@@ -19,6 +19,7 @@
|
||||
// Frontend Monster <https://github.com/frontendmonster>
|
||||
// Ming Chen <https://github.com/mingchen>
|
||||
// Olga Isakova <https://github.com/penumbra1>
|
||||
// Orblazer <https://github.com/orblazer>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -1431,11 +1432,19 @@ declare module "mongoose" {
|
||||
*/
|
||||
unmarkModified(path: string): void;
|
||||
|
||||
/** Sends an replaceOne command with this document _id as the query selector. */
|
||||
replaceOne(replacement: any, callback?: (err: any, raw: any) => void): Query<any>;
|
||||
|
||||
/** Sends an update command with this document _id as the query selector. */
|
||||
update(doc: any, callback?: (err: any, raw: any) => void): Query<any>;
|
||||
update(doc: any, options: ModelUpdateOptions,
|
||||
callback?: (err: any, raw: any) => void): Query<any>;
|
||||
|
||||
/** Sends an updateOne command with this document _id as the query selector. */
|
||||
updateOne(doc: any, callback?: (err: any, raw: any) => void): Query<any>;
|
||||
updateOne(doc: any, options: ModelUpdateOptions,
|
||||
callback?: (err: any, raw: any) => void): Query<any>;
|
||||
|
||||
/**
|
||||
* Executes registered validation rules for this document.
|
||||
* @param optional options internal options
|
||||
|
||||
Reference in New Issue
Block a user