diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index a94f3a691d..ba0e6344cb 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -2274,6 +2274,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