UNPKG

@reactivex/ix-esnext-esm

Version:

The Interactive Extensions for JavaScript

19 lines (18 loc) 866 B
import { AsyncIterableX } from '../asynciterablex'; import { MonoTypeOperatorAsyncFunction } from '../../interfaces'; export declare class FlattenAsyncIterable<TSource> extends AsyncIterableX<TSource> { private _source; private _depth; constructor(source: AsyncIterable<TSource>, depth: number); private _flatten; [Symbol.asyncIterator](signal?: AbortSignal): AsyncIterator<TSource, any, undefined>; } /** * Flattens the nested async-iterable by the given depth. * * @export * @template T The type of elements in the source sequence. * @param {number} [depth=Infinity] The depth to flatten the async-iterable sequence if specified, otherwise infinite. * @returns {MonoTypeOperatorAsyncFunction<T>} An operator that flattens the async-iterable sequence. */ export declare function flat<T>(depth?: number): MonoTypeOperatorAsyncFunction<T>;