Skip to content

Commit

Permalink
Add usePushEach flag to Mongoose Schema Options (#23042)
Browse files Browse the repository at this point in the history
In order for devs to be able to work around the issues described in
Automattic/mongoose#5574 we need to be able
to supply the `usePushEach` flag to the Mongoose SchemaOptions. This
options functionality is described in
Automattic/mongoose#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.
  • Loading branch information
stieg authored and weswigham committed Jan 19, 2018
1 parent 17da0c5 commit d512b1f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions types/mongoose/index.d.ts
Expand Up @@ -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" */
Expand Down

0 comments on commit d512b1f

Please sign in to comment.