From e5545e729bb7b6c76816800e9d39ccdd21b147fa Mon Sep 17 00:00:00 2001 From: "Andrew Stiegmann (stieg)" Date: Thu, 18 Jan 2018 15:56:13 -1000 Subject: [PATCH] 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. --- types/mongoose/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index 3e676b499f..ee703de783 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -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" */