Interface WeakSet<T>
interface WeakSet<T> {
[toStringTag]: string;
add(value: T): this;
delete(value: T): boolean;
has(value: T): boolean;
}
[toStringTag]: string;
add(value: T): this;
delete(value: T): boolean;
has(value: T): boolean;
}
Type Parameters
- T extends WeakKey
Index
Properties
Methods
Methods
add
- add(value): this
Parameters
- value: T
Returns this
delete
- delete(value): boolean
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.
has
- has(value): boolean
Parameters
- value: T
Returns boolean
a boolean indicating whether a value exists in the WeakSet or not.
Appends a new value to the end of the WeakSet.