/** * Convert a synchronous iterator into an asynchronous one. */ export declare const asyncIteratorFrom: (iterator: Iterator) => AsyncIterator; /** * If the value is already an Iterator, return it. * If the value is Iterable, return an Iterator for it. * Otherwise, throw an error. */ export declare const iteratorOf: (it: Iterable | Iterator) => Iterator; /** * If the value is already an Iterator, return it. * If the value is AsyncIterable, return an Iterator for it. * It the value is Iterable, upgrade an Iterator for it to an AsyncIterator * and return that. * Otherwise, throw an error. * @remarks * As the only difference between an Iterator and an AsyncIterator * is the return type of the `next` function, this function cannot * distinguish whether a given Iterator is an AsyncIterator or not. * If your calling code does not use `await` and instead uses `then` * directly, you may end up with errors. */ export declare const asyncIteratorOf: (it: AsyncIterable | Iterable | AsyncIterator) => AsyncIterator; //# sourceMappingURL=iterator.d.ts.map