mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-09 11:40:07 +00:00
Mongoose: add session? to QueryFindOneAndUpdateOptions interface (#40937)
* add session? to QueryFindOneAndUpdateOptions interface Needed to run findOneAndUpdate inside of a transaction * add session param to QueryFindOneAndRemoveOptions
This commit is contained in:
3
types/mongoose/index.d.ts
vendored
3
types/mongoose/index.d.ts
vendored
@@ -2280,6 +2280,8 @@ declare module "mongoose" {
|
||||
rawResult?: boolean;
|
||||
/** overwrites the schema's strict mode option for this update */
|
||||
strict?: boolean|string;
|
||||
/** use client session for transaction */
|
||||
session?: ClientSession;
|
||||
}
|
||||
|
||||
interface QueryFindOneAndUpdateOptions extends QueryFindOneAndRemoveOptions {
|
||||
@@ -2310,6 +2312,7 @@ declare module "mongoose" {
|
||||
if this is set, Mongoose will delete baz from the update in Model.updateOne({}, { foo: 'bar', baz: undefined })
|
||||
before sending the update to the server.**/
|
||||
omitUndefined?: boolean;
|
||||
session?: ClientSession;
|
||||
}
|
||||
|
||||
interface QueryUpdateOptions extends ModelUpdateOptions {
|
||||
|
||||
Reference in New Issue
Block a user