• Concatenates two sequences.

    Type Parameters

    • TSource

    Parameters

    • src: Iterable<TSource>

      The source iterable.

    • collection: Iterable<TSource>

      The sequence to concatenate to the first sequence.

    Returns IEnumerable<TSource>

    An IEnumerable that contains the concatenated elements of the two input sequences.

    const numbers = [1, 2];
    const moreNumbers = from(numbers).concatenate([3, 4, 5]); // [1, 2, 3, 4, 5]

    TSource The type of the source iterable.

  • Concatenates two sequences.

    Type Parameters

    • TSource

    Parameters

    • src: Iterable<TSource>

      The source iterable.

    • ...collections: Iterable<TSource>[]

      The sequences to concatenate to the first sequence.

    Returns IEnumerable<TSource>

    An IEnumerable that contains the concatenated elements of the two or more input sequences.

    const numbers = [1, 2];
    const evenMoreNumbers = from(numbers).concatenate([3, 4], [5, 6]); // [1, 2, 3, 4, 5, 6]

    TSource The type of the source iterable.