UNPKG

590 BTypeScriptView Raw
1import { AsyncIterableX } from './asynciterablex';
2/**
3 * Creates a new iterable using the specified function implementing the members of AsyncIterable
4 *
5 * @export
6 * @template T The type of the elements returned by the enumerable sequence.
7 * @param {((signal?: AbortSignal) => AsyncIterator<T> | Promise<AsyncIterator<T>>)} fn The function that creates the [Symbol.asyncIterator]() method
8 * @returns {AsyncIterableX<T>} A new async-iterable instance.
9 */
10export declare function create<T>(fn: (signal?: AbortSignal) => AsyncIterator<T> | Promise<AsyncIterator<T>>): AsyncIterableX<T>;