- getIterator<Iterable>(iterable: Iterable): Iterable extends AsynchronousIterable<Item> ? Iterable extends AsyncIterable<Item> ? AsyncIterator<Item, Item, Item> : Iterator<Item, Item, Item> : never
-
Type Parameters
-
Iterable extends AsynchronousIterable<unknown>
Returns Iterable extends AsynchronousIterable<Item> ? Iterable extends AsyncIterable<Item> ? AsyncIterator<Item, Item, Item> : Iterator<Item, Item, Item> : never
Get a
Symbol.iterator
from an iterable or aSymbol.asyncIterator
from an asynchronous iterable.Example
Returns
Iterator instance.