usage: Model.aggregate().match(), error: Expected 1-2 arguments, but got 0.

This commit is contained in:
Tümay Çeber
2018-02-14 16:19:04 +03:00
parent 8ceee56cb9
commit ecfbd369d7

View File

@@ -2435,6 +2435,7 @@ declare module "mongoose" {
* If a callback is not passed, the aggregate itself is returned.
* @param aggregations pipeline operator(s) or operator array
*/
aggregate(): Aggregate<any[]>;
aggregate(aggregations: any[]): Aggregate<any[]>;
aggregate(aggregations: any[], cb: Function): Promise<any[]>;