UNPKG

961 BTypeScriptView Raw
1import { AsyncIterableX } from './asynciterablex';
2/**
3 * Returns an async iterable sequence that is the result of invoking the selector on the source sequence,
4 * without sharing subscriptions. This operator allows for a fluent style of writing queries that use
5 * the same sequence multiple times.
6 * @param {AsyncIterable<TSource>} source Source sequence that will be shared in the selector function.
7 * @param {function(source: AsyncIterable<TSource>): AsyncIterable<TResult>} selector Selector function which can use
8 * the source sequence as many times as needed, without sharing subscriptions to the source sequence.
9 * @returns An async iterable sequence that contains the elements of a sequence produced by multicasting the source
10 * sequence within a selector function.
11 */
12export declare function chain<TSource, TResult>(source: AsyncIterable<TSource>, selector: (source: AsyncIterable<TSource>) => AsyncIterable<TResult>): AsyncIterableX<TResult>;