• Returns elements from an 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) => value is S)

      A function to test each element for a condition.

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

          • value: T
          • index: number

          Returns value is S

    Returns OperatorFunction<T, S>

    An 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 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) => boolean)

      A function to test each element for a condition.

        • (value, index): boolean
        • Parameters

          • value: T
          • index: number

          Returns boolean

    Returns OperatorFunction<T, T>

    An 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