Function startWith

  • Returns a Stream that yields elements from the source followed by the provided values.

    Type Parameters

    • T

      Type of items in the source.

    Parameters

    • Rest...values: T[]

      Values to yield after the source.

    Returns OperationFunction<T, T>

    Operation that yields elements from the source followed by the provided values.

    const result = startWith(0, 1, 2)([3, 4, 5]);
    console.log([...result]); // [0, 1, 2, 3, 4, 5]