Interface WeakSet<T>

    interface WeakSet<T> {
        [toStringTag]: string;
        add(value: T): this;
        delete(value: T): boolean;
        has(value: T): boolean;
    }

    Type Parameters

    Properties

    Methods

    Properties

    [toStringTag]: string

    Methods

    • Appends a new value to the end of the WeakSet.

      Parameters

      • value: T

      Returns this

    • Removes the specified element from the WeakSet.

      Parameters

      • value: T

      Returns boolean

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

    • Parameters

      • value: T

      Returns boolean

      a boolean indicating whether a value exists in the WeakSet or not.