@ascentbv/ts-common - v1.0.220
    Preparing search index...

    Class AnySet<T>

    Type Parameters

    • T

    Implements

    • Set<T>
    Index

    Constructors

    • Type Parameters

      • T

      Parameters

      • keyFn: (value: T) => string | number
      • Optionalvalues: readonly T[] | null

      Returns AnySet<T>

    Properties

    "[toStringTag]": string = ...

    Accessors

    • get size(): number

      Returns number

      the number of (unique) elements in Set.

    Methods

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

      Parameters

      • value: T

      Returns this

    • 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.

    • Parameters

      • value: T

      Returns boolean

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

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

      Parameters

      • callback: (value: T, value2: T, set: Set<T>) => void
      • OptionalthisArg: any

      Returns void