File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,11 @@ The new minimum supported Node.js version is now 14.20.1.
192
192
The MongoClient option ` promiseLibrary ` along with the ` Promise.set ` export that allows specifying a custom promise library has been removed.
193
193
This allows the driver to adopt async/await syntax which has [ performance benefits] ( https://v8.dev/blog/fast-async ) over manual promise construction.
194
194
195
+ ### Cursors now implement ` AsyncGenerator ` interface instead of ` AsyncIterator `
196
+
197
+ All cursor types have been changed to implement ` AsyncGenerator ` instead of ` AsyncIterator ` .
198
+ This was done to make our typing more accurate.
199
+
195
200
### Cursor closes on exit of for await of loops
196
201
197
202
Cursors will now automatically close when exiting a for await of loop on the cursor itself.
Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ export abstract class AbstractCursor<
288
288
return bufferedDocs ;
289
289
}
290
290
291
- async * [ Symbol . asyncIterator ] ( ) : AsyncIterator < TSchema , void > {
291
+ async * [ Symbol . asyncIterator ] ( ) : AsyncGenerator < TSchema , void , void > {
292
292
if ( this . closed ) {
293
293
return ;
294
294
}
You can’t perform that action at this time.
0 commit comments