Optional
values: T[]Readonly
array$An observable emitting the values of the set as an array
Readonly
empty$An observable emitting true if the collection is empty
Readonly
itemEmits for every item that is added to the set
Readonly
itemEmits for every item that is added/removed in the list, including the changes from an empty set to the current state
Readonly
itemEmits for every item that is removed from the set
Readonly
itemEmits for every item that is added/removed in the set
Readonly
size$An observable emitting the number of items in the collection
Readonly
updates$Emits all updates to the set
Readonly
value$An observable emitting the inner non-observable Set
True if the collection is empty
The number of items in the collection
Add a value to the collection is not already present
The value to add
added - Returns true if the value was added
Add a list of values to the collection is not already present
The values to add
added - Returns true if any value was added
Remove a value from the collection
The key to remove
removed - True if the value existed
Remove values from the collection
The values to remove
removed - True if any values were removed
Check if a key exists in the collection
Create am observable emitting true if a key exists in the collection
Reset the values in the collection to the provided list
The values to set
changed - Returns true if the collection changed
Toggle a value in the set
The value to toggle
Optional
state: booleanA forced state (true
= always add, false
= always delete)
The applied change (true
= item added, false
= item removed, undefined
= nothing changed)
A Set where the state and values can be observed