Add usePushEach flag to Mongoose Schema Options (#23042)

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
2018-01-19 10:15:29 -08:00
committed by Wesley Wigham
parent 17da0c5f54
commit d512b1f5d1
+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" */