• Converts all elements of an Iterable to an Array.

    Example

    Convert Iterable to Array

    const iterable = [1, 2, 3];
    const array = toArray(iterable);
    console.log(array); // [1, 2, 3]

    Returns

    an Array consisting of all elements

    Type Parameters

    • T

      the Iterable value type

    Parameters

    • iterable: Iterable<T>

      the Iterable to convert

    Returns T[]

Generated using TypeDoc