You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whether there are more values to iterate on before the iterator is done.
6
+
*/
7
+
done: bool,
8
+
/**
9
+
The value of this iteration, if any.
10
+
*/
11
+
value: option<'a>,
12
+
}
13
+
14
+
/**
15
+
`next(asyncIterator)`
16
+
17
+
Returns the next value of the iterator, if any.
18
+
19
+
See [async iterator protocols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) on MDN.
20
+
21
+
## Examples
22
+
- A simple example, getting the next value:
23
+
```rescript
24
+
let {done, value} = await someAsyncIterator->AsyncIterator.next
25
+
```
26
+
27
+
- Complete example, including looping over all values:
28
+
```rescript
29
+
// Let's pretend we get an async iterator returning ints from somewhere.
0 commit comments