Class ReadonlySvelteSet<T>
Type Parameters
- T
Implements
Constructors
constructor
Methods
[iterator]
-
Iterates over values in the set.
Returns SetIterator<T>
difference
entries
-
Returns an iterable of [v,v] pairs for every value
vin the set.Returns SetIterator<[T, T]>
forEach
-
Executes a provided function once for each value in this set, in insertion order.
Parameters
- callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void
Callback function.
OptionalthisArg: anyOptional this reference for callback function.
Returns void
- callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void
has
-
Returns a boolean indicating whether an element with the specified value exists in this set or not.
Parameters
- value: T
Value to test.
Returns boolean
- value: T
intersection
isDisjointFrom
-
Parameters
- other: ReadonlySetLike<unknown>
Returns boolean
a boolean indicating whether this Set has no elements in common with the argument.
isSubsetOf
-
Parameters
- other: ReadonlySetLike<unknown>
Returns boolean
a boolean indicating whether all the elements in this Set are also in the argument.
isSupersetOf
-
Parameters
- other: ReadonlySetLike<unknown>
Returns boolean
a boolean indicating whether all the elements in the argument are also in this Set.
keys
-
Despite its name, returns an iterable of the values in the set.
Returns SetIterator<T>
subscribe
-
Parameters
- handler: Subscriber<ReadonlySvelteSet<T>>
Callback function that is invoked on update / changes.
Returns Unsubscriber
Unsubscribe function.
- handler: Subscriber<ReadonlySvelteSet<T>>
symmetricDifference
union
values
-
Returns an iterable of values in the set.
Returns SetIterator<T>
Provides a readonly variant of SvelteSet wrapping an instance of SvelteSet as the source.