mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
fix(mongoose): add arrayFilters to Model.findOneAndUpdate (#43062)
This commit is contained in:
parent
d1581b6eeb
commit
d0b79424bd
4
types/mongoose/index.d.ts
vendored
4
types/mongoose/index.d.ts
vendored
@ -2391,6 +2391,10 @@ declare module "mongoose" {
|
||||
before sending the update to the server.**/
|
||||
omitUndefined?: boolean;
|
||||
session?: ClientSession;
|
||||
/**
|
||||
* Only update elements that match the arrayFilters conditions in the document or documents that match the query conditions.
|
||||
*/
|
||||
arrayFilters?: { [key: string]: any }[];
|
||||
}
|
||||
|
||||
interface QueryUpdateOptions extends ModelUpdateOptions {
|
||||
|
||||
@ -1934,6 +1934,7 @@ MongoModel.findOneAndRemove();
|
||||
MongoModel.findOneAndUpdate({}, {}, {}, cb);
|
||||
MongoModel.findOneAndUpdate({}, {}, {});
|
||||
MongoModel.findOneAndUpdate({}, {}, { upsert: true, new: true });
|
||||
MongoModel.findOneAndUpdate({}, {}, { upsert: true, new: true, arrayFilters: [{ 'elem._id': 123 }] });
|
||||
MongoModel.findOneAndUpdate({}, {}, cb);
|
||||
MongoModel.findOneAndUpdate({}, {});
|
||||
MongoModel.findOneAndUpdate();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user