• Returns elements from an async-iterable sequence as long as a specified condition is true.

    Type Parameters

    • T

      The type of the elements in the source sequence.

    • S

      The result of the predicate that is truthy/falsy.

    Parameters

    • predicate: ((value, index, signal?) => value is S)

      A function to test each element for a condition.

        • (value, index, signal?): value is S
        • Parameters

          • value: T
          • index: number
          • Optional signal: AbortSignal

          Returns value is S

    Returns OperatorAsyncFunction<T, S>

    An async-iterable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes.

  • Returns elements from an async-iterable sequence as long as a specified condition is true.

    Type Parameters

    • T

      The type of the elements in the source sequence.

    Parameters

    • predicate: ((value, index, signal?) => boolean | Promise<boolean>)

      A function to test each element for a condition.

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

          • value: T
          • index: number
          • Optional signal: AbortSignal

          Returns boolean | Promise<boolean>

    Returns OperatorAsyncFunction<T, T>

    An async-iterable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes.

Generated using TypeDoc