Function setAddMany

  • Adds multiple values to a given set.

    Type Parameters

    • T

      The type of elements in the set.

    Parameters

    • set: Set<T>

      The set to which values will be added.

    • values: Iterable<T>

      The values to be added to the set.

    Returns Set<T>

    The updated set with the new values added.

    Example

    const mySet = new Set<number>();
    setAddMany(mySet, [1, 2, 3]);
    console.log(mySet); // Set { 1, 2, 3 }

Generated using TypeDoc