From a411c9ee5d4569e8d0dbb30c99f8b3f802224ef0 Mon Sep 17 00:00:00 2001 From: Hinell Date: Sat, 14 Jan 2017 01:51:34 +0300 Subject: [PATCH] [mongodb] Cursor.forEach generic type --- mongodb/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mongodb/index.d.ts b/mongodb/index.d.ts index 5b5c8de876..d97c65b342 100644 --- a/mongodb/index.d.ts +++ b/mongodb/index.d.ts @@ -1151,7 +1151,7 @@ export interface Cursor extends Readable { //http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#filter filter(filter: Object): Cursor; // http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#forEach - forEach(iterator: IteratorCallback, callback: EndCallback): void; + forEach(iterator: IteratorCallback, callback: EndCallback): void; // http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#hasNext hasNext(): Promise; hasNext(callback: MongoCallback): void; @@ -1221,8 +1221,8 @@ export interface CursorCommentOptions { } //http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#~iteratorCallback -export interface IteratorCallback { - (doc: any): void; +export interface IteratorCallback { + (doc: T): void; } //http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#~endCallback