mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
mongoose: countDocuments() definitions added (#27283)
This commit is contained in:
parent
bfe8783484
commit
355dbd50e8
8
types/mongoose/index.d.ts
vendored
8
types/mongoose/index.d.ts
vendored
@ -8,6 +8,7 @@
|
||||
// Ethan Resnick <https://github.com/ethanresnick>
|
||||
// vologa <https://github.com/vologab>
|
||||
// jussikinnula <https://github.com/jussikinnula>
|
||||
// ondratra <https://github.com/ondratra>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@ -1600,6 +1601,13 @@ declare module "mongoose" {
|
||||
count(callback?: (err: any, count: number) => void): Query<number>;
|
||||
count(criteria: any, callback?: (err: any, count: number) => void): Query<number>;
|
||||
|
||||
/**
|
||||
* Counts number of matching documents in a database collection.
|
||||
* @param criteria mongodb selector
|
||||
*/
|
||||
countDocuments(callback?: (err: any, count: number) => void): Query<number>;
|
||||
countDocuments(criteria: any, callback?: (err: any, count: number) => void): Query<number>;
|
||||
|
||||
/**
|
||||
* Returns a wrapper around a mongodb driver cursor. A Query<T>Cursor exposes a
|
||||
* Streams3-compatible interface, as well as a .next() function.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user