mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-31 03:02:04 +08:00
Merge pull request #26527 from YouriT/patch-1
Mongoose: expose Aggregate.count(..) method
This commit is contained in:
6
types/mongoose/index.d.ts
vendored
6
types/mongoose/index.d.ts
vendored
@@ -2276,6 +2276,12 @@ declare module "mongoose" {
|
||||
/** Adds a collation. */
|
||||
collation(options: CollationOptions): this;
|
||||
|
||||
/**
|
||||
* Appends a new $count operator to this aggregate pipeline.
|
||||
* @param countName name of the count field
|
||||
*/
|
||||
count(countName: string): this;
|
||||
|
||||
/**
|
||||
* Sets the cursor option option for the aggregation query (ignored for < 2.6.0).
|
||||
* Note the different syntax below: .exec() returns a cursor object, and no callback
|
||||
|
||||
@@ -1200,6 +1200,7 @@ aggregate.allowDiskUse(true).allowDiskUse(false, []);
|
||||
aggregate.append({ $project: { field: 1 }}, { $limit: 2 });
|
||||
aggregate.append([{ $match: { daw: 'Logic Audio X' }} ]);
|
||||
aggregate.collation({ locale: 'en_US', strength: 1 });
|
||||
aggregate.count('countName');
|
||||
aggregate.cursor({ batchSize: 1000 }).exec().each(cb);
|
||||
aggregate.exec().then(cb).catch(cb);
|
||||
aggregate.option({foo: 'bar'}).exec();
|
||||
|
||||
Reference in New Issue
Block a user