Add usePushEach flag to Mongoose Schema Options

In order for devs to be able to work around the issues described in
https://github.com/Automattic/mongoose/issues/5574 we need to be able
to supply the `usePushEach` flag to the Mongoose SchemaOptions. This
options functionality is described in
https://github.com/Automattic/mongoose/issues/4455 and is required for
anyone who modifies arrays inline who is using Mongoose 4 and MongoDB
3.6+

Testing:
  Copied changes to local project and verified compilation worked.
This commit is contained in:
Andrew Stiegmann (stieg)
2018-01-18 16:00:14 -10:00
parent 8289d12c75
commit e5545e729b
+2
View File
@@ -815,6 +815,8 @@ declare module "mongoose" {
typeKey?: string;
/** defaults to false */
useNestedStrict?: boolean;
/** defaults to false */
usePushEach?: boolean;
/** defaults to true */
validateBeforeSave?: boolean;
/** defaults to "__v" */