From 32c1c2e72bf3932cfcf466fc547616356ccd7eee Mon Sep 17 00:00:00 2001 From: Gady Date: Tue, 1 Aug 2017 18:22:51 +0100 Subject: [PATCH] Improve Cursor.count (#18504) --- types/mongodb/index.d.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index 9d667a8983..0105c6104d 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -463,7 +463,7 @@ export interface Collection { bulkWrite(operations: Object[], callback: MongoCallback): void; bulkWrite(operations: Object[], options?: CollectionBluckWriteOptions): Promise; bulkWrite(operations: Object[], options: CollectionBluckWriteOptions, callback: MongoCallback): void; - //http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#count + //http://mongodb.github.io/node-mongodb-native/2.2/api/Collection.html#count count(query: Object, callback: MongoCallback): void; count(query: Object, options?: MongoCountPreferences): Promise; count(query: Object, options: MongoCountPreferences, callback: MongoCallback): void; @@ -1021,10 +1021,12 @@ export class Cursor extends Readable { close(callback: MongoCallback): void; // http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#comment comment(value: string): Cursor; - // http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#count + // http://mongodb.github.io/node-mongodb-native/2.2/api/Cursor.html#count + count(callback: MongoCallback): void; count(applySkipLimit: boolean, callback: MongoCallback): void; - count(applySkipLimit: boolean, options?: CursorCommentOptions): Promise; + count(options: CursorCommentOptions, callback: MongoCallback): void; count(applySkipLimit: boolean, options: CursorCommentOptions, callback: MongoCallback): void; + count(applySkipLimit?: boolean, options?: CursorCommentOptions): Promise; // http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#explain explain(): Promise; explain(callback: MongoCallback): void;