From fccbe3ee15f374438a4c19a474ffb1e5aee6e4de Mon Sep 17 00:00:00 2001 From: Coroliov Oleg <1880059+ruscon@users.noreply.github.com> Date: Fri, 18 Oct 2019 15:05:27 +0300 Subject: [PATCH] fix: mongodb Cursor.forEach types (#4759) --- src/driver/mongodb/typings.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/driver/mongodb/typings.ts b/src/driver/mongodb/typings.ts index 2a0c973899..319319a1d5 100644 --- a/src/driver/mongodb/typings.ts +++ b/src/driver/mongodb/typings.ts @@ -5011,9 +5011,10 @@ export declare class Cursor extends Readable { * Iterates over all the documents for this cursor using the iterator, callback pattern. * @param iterator The iteration callback. * @param callback The end callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#forEach + * @see http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#forEach */ forEach(iterator: IteratorCallback, callback: EndCallback): void; + forEach(iterator: IteratorCallback): Promise; /** * Check if there is any document still available in the cursor.