• If the specified condition evaluates true, select the thenSource sequence. Otherwise, select the elseSource sequence.

    Type Parameters

    • TSource

      The type of the elements in the result sequence.

    Parameters

    • condition: ((signal?) => boolean | Promise<boolean>)

      Condition evaluated to decide which sequence to return.

        • (signal?): boolean | Promise<boolean>
        • Parameters

          • Optional signal: AbortSignal

          Returns boolean | Promise<boolean>

    • thenSource: AsyncIterable<TSource>

      Sequence returned in case evaluates true.

    • Optional elseSource: AsyncIterable<TSource> = ...

      Sequence returned in case condition evaluates false.

    Returns AsyncIterable<TSource>

    thenSource if condition evaluates true; elseSource otherwise.

Generated using TypeDoc