Type Parameters

  • T

Hierarchy

  • Set<T>
    • SortableSet

Constructors

  • Type Parameters

    • T

    Parameters

    • Optional values: null | readonly T[]

    Returns SortableSet<T>

  • Type Parameters

    • T

    Parameters

    Returns SortableSet<T>

Properties

[toStringTag]: string
size: number

Returns

the number of (unique) elements in Set.

[species]: SetConstructor

Methods

  • Iterates over values in the set.

    Returns IterableIterator<T>

  • Appends a new element with a specified value to the end of the Set.

    Parameters

    • value: T

    Returns SortableSet<T>

  • Returns void

  • Removes a specified value from the Set.

    Parameters

    • value: T

    Returns boolean

    Returns true if an element in the Set existed and has been removed, or false if the element does not exist.

  • Returns an iterable of [v,v] pairs for every value v in the set.

    Returns IterableIterator<[T, T]>

  • Executes a provided function once per each value in the Set object, in insertion order.

    Parameters

    • callbackfn: ((value, value2, set) => void)
        • (value, value2, set): void
        • Parameters

          • value: T
          • value2: T
          • set: Set<T>

          Returns void

    • Optional thisArg: any

    Returns void

  • Get data from cache

    Type Parameters

    • R

    Parameters

    • fn: ((arg0) => R)

    Returns R

  • Get data from cache (ignoring sorting)

    Type Parameters

    • R

    Parameters

    • fn: ((arg0) => R)

    Returns R

  • Parameters

    • value: T

    Returns boolean

    a boolean indicating whether an element with the specified value exists in the Set or not.

  • Despite its name, returns an iterable of the values in the set.

    Returns IterableIterator<T>

  • Sort with a comparer function

    Parameters

    • sortFn: ((arg0, arg1) => number)
        • (arg0, arg1): number
        • Parameters

          • arg0: T
          • arg1: T

          Returns number

    Returns void

  • Returns T[]

  • Returns an iterable of values in the set.

    Returns IterableIterator<T>

Generated using TypeDoc