From fdaff332fb1a6b53813b08bada97d6d5a348683c Mon Sep 17 00:00:00 2001 From: lonsenluo Date: Sun, 12 Feb 2017 17:37:53 +0800 Subject: [PATCH] [mongoose] add unwind method with new params type In mongodb 3.2, the unwind operator can with a object params. --- mongoose/index.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mongoose/index.d.ts b/mongoose/index.d.ts index 40821b8968..7ef5615436 100644 --- a/mongoose/index.d.ts +++ b/mongoose/index.d.ts @@ -2163,6 +2163,11 @@ declare module "mongoose" { * @param fields the field(s) to unwind */ unwind(...fields: string[]): this; + /** + * Appends new custom $unwind operator(s) to this aggregate pipeline + * new in mongodb 3.2 + */ + unwind(...opts: { path: string, includeArrayIndex?: string, preserveNullAndEmptyArrays?: boolean }[]): this; } /*