File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,10 @@ declare module 'mongoose' {
11
11
signal ?: AbortSignal ;
12
12
}
13
13
14
- class Cursor < DocType = any , Options = never > extends stream . Readable {
15
- [ Symbol . asyncIterator ] ( ) : AsyncIterableIterator < DocType > ;
14
+ class Cursor < DocType = any , Options = never , NextResultType = DocType | null > extends stream . Readable {
15
+ [ Symbol . asyncIterator ] ( ) : Cursor < IteratorResult < DocType > , Options , IteratorResult < DocType > > ;
16
+
17
+ [ Symbol . asyncDispose ] ( ) : Promise < void > ;
16
18
17
19
/**
18
20
* Adds a [cursor flag](https://mongodb.github.io/node-mongodb-native/4.9/classes/FindCursor.html#addCursorFlag).
@@ -58,7 +60,7 @@ declare module 'mongoose' {
58
60
* Get the next document from this cursor. Will return `null` when there are
59
61
* no documents left.
60
62
*/
61
- next ( ) : Promise < DocType | null > ;
63
+ next ( ) : Promise < NextResultType > ;
62
64
63
65
options : Options ;
64
66
}
You can’t perform that action at this time.
0 commit comments