From b7ba5e828bb0ede78b1f1f7df380f21787f5d70a Mon Sep 17 00:00:00 2001 From: geraldinelemeur <37600826+geraldinelemeur@users.noreply.github.com> Date: Fri, 20 Jul 2018 21:00:59 -0400 Subject: [PATCH] [mongodb] Cursor.next() resolves to null if no more documents. (#27402) --- types/mongodb/index.d.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index c58f690433..8ce8f52fa4 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -12,6 +12,7 @@ // Denys Bushulyak // Bastien Arata // Wan Bachtiar +// Geraldine Lemeur // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -1286,8 +1287,8 @@ export class Cursor extends Readable { /** http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#min */ min(min: number): Cursor; /** http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#next */ - next(): Promise; - next(callback: MongoCallback): void; + next(): Promise; + next(callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#project */ project(value: Object): Cursor; /** http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#read */ @@ -1365,8 +1366,8 @@ export class AggregationCursor extends Readable { /** http://mongodb.github.io/node-mongodb-native/3.1/api/AggregationCursor.html#maxTimeMS */ maxTimeMS(value: number): AggregationCursor; /** http://mongodb.github.io/node-mongodb-native/3.1/api/AggregationCursor.html#next */ - next(): Promise; - next(callback: MongoCallback): void; + next(): Promise; + next(callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/AggregationCursor.html#out */ out(destination: string): AggregationCursor; /** http://mongodb.github.io/node-mongodb-native/3.1/api/AggregationCursor.html#project */