Interface ReadonlySet<T>
interface ReadonlySet<T> {
size: number;
[iterator](): SetIterator<T>;
entries(): SetIterator<[T, T]>;
forEach(callbackfn: ((value: T, value2: T, set: ReadonlySet<T>) => void), thisArg?: any): void;
has(value: T): boolean;
keys(): SetIterator<T>;
values(): SetIterator<T>;
}
size: number;
[iterator](): SetIterator<T>;
entries(): SetIterator<[T, T]>;
forEach(callbackfn: ((value: T, value2: T, set: ReadonlySet<T>) => void), thisArg?: any): void;
has(value: T): boolean;
keys(): SetIterator<T>;
values(): SetIterator<T>;
}
Type Parameters
Methods
[iterator]
- [iterator](): SetIterator<T>
Returns SetIterator<T>
entries
- entries(): SetIterator<[T, T]>
Returns an iterable of [v,v] pairs for every value
v
in the set.Returns SetIterator<[T, T]>
forEach
- for
Each (callbackfn, thisArg?): void Parameters
- callbackfn: ((value: T, value2: T, set: ReadonlySet<T>) => void)
- (value, value2, set): void
Parameters
- value: T
- value2: T
- set: ReadonlySet<T>
Returns void
Optional
thisArg: any
Returns void
- callbackfn: ((value: T, value2: T, set: ReadonlySet<T>) => void)
has
- has(value): boolean
Parameters
- value: T
Returns boolean
keys
- keys(): SetIterator<T>
Despite its name, returns an iterable of the values in the set.
Returns SetIterator<T>
values
- values(): SetIterator<T>
Returns an iterable of values in the set.
Returns SetIterator<T>
Iterates over values in the set.