AsyncIterable
AsyncIterable is a concept in JavaScript and related environments that represents objects which can be consumed asynchronously through iteration. An AsyncIterable follows the AsyncIterable protocol, enabling a sequence of values to be produced lazily and awaited as they become available.
In practice, an AsyncIterable must expose a method keyed by Symbol.asyncIterator. This method returns an AsyncIterator,
The primary way to consume an AsyncIterable is with the for await...of loop, which automatically awaits each
Creating custom AsyncIterables typically involves defining the [Symbol.asyncIterator] method to return an object whose next() returns
See also: AsyncIterator, asynchronous generators, for await...of, streams.