From 15d6660a319b8b0edf8560f14ec1dbf08363b043 Mon Sep 17 00:00:00 2001 From: Sayan Saha Date: Thu, 10 Dec 2020 14:29:50 +0530 Subject: [PATCH] fix(index.d.ts): add missing Aggregate#skip() & Aggregate#limit() --- index.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/index.d.ts b/index.d.ts index 1e29f4d32dc..a87dae0a276 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2236,6 +2236,12 @@ declare module "mongoose" { /** Sets the hint option for the aggregation query (ignored for < 3.6.0) */ hint(value: object | string): this; + /** + * Appends a new $limit operator to this aggregate pipeline. + * @param num maximum number of records to pass to the next stage + */ + limit(num: number): this; + /** Appends new custom $lookup operator to this aggregate pipeline. */ lookup(options: any): this; @@ -2265,6 +2271,12 @@ declare module "mongoose" { /** Sets the session for this aggregation. Useful for [transactions](/docs/transactions.html). */ session(session: mongodb.ClientSession | null): this; + + /** + * Appends a new $skip operator to this aggregate pipeline. + * @param num number of records to skip before next stage + */ + skip(num: number): this; /** Appends a new $sort operator to this aggregate pipeline. */ sort(arg: any): this;