///
///
interface ReadonlySet extends Iterable {
/**
* **DO NOT USE!**
*
* This field exists to force TypeScript to recognize this as a nominal type
* @hidden
* @deprecated
*/
readonly _nominal_Set: unique symbol;
/**
* Returns true if empty, otherwise false.
*/
isEmpty(this: ReadonlySet): boolean;
/**
* Performs the specified action for each (element / pair of elements) in the set
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each (element / pair of elements) in the array.
*/
forEach(this: ReadonlySet, callbackfn: (value: T, value2: T, self: ReadonlySet) => void): void;
/**
* Returns the number of elements in the set
*/
size(this: ReadonlySet): number;
/**
* Returns a boolean for whether the given key exists in the set
*/
has(this: ReadonlySet, value: T): boolean;
}
interface ReadonlySetConstructor {
new (): ReadonlySet;
new (values: ReadonlyArray): ReadonlySet;
}
declare const ReadonlySet: ReadonlySetConstructor;
interface Set extends ReadonlySet {
/**
* Adds a value to the set
*/
add(this: Set, value: T): this;
/**
* Deletes the given key from the set.
*
* Returns a boolean indicating whether or not a value was removed.
*/
delete(this: Set, value: T): boolean;
/**
* Deletes all members of the set.
*/
clear(this: Set): void;
}
interface SetConstructor {
new (): Set;
new (values: ReadonlyArray): Set;
}
declare const Set: SetConstructor;
/** A Set object with its `__mode` metamethod set to "k" */
interface WeakSet extends Set {}
interface WeakSetConstructor {
new (): WeakSet;
new (values: ReadonlyArray): WeakSet;
}
declare const WeakSet: WeakSetConstructor;