Skip to content

IReadOnlyObservableSet

github-actions[bot] edited this page Dec 3, 2024 · 3 revisions
API / IReadOnlyObservableSet<TItem> interface

Represents a read-only observable set based on the Set interface.

Extends Iterable<TItem>, ISetLike<TItem>, INotifyPropertiesChanged, INotifySetChanged<TItem>.

interface IReadOnlyObservableSet<TItem>
    extends Iterable<TItem>, ISetLike<TItem>, INotifyPropertiesChanged, INotifySetChanged<TItem>

Source reference: src/collections/observableSet/IReadOnlyObservableSet.ts:9.

Generic Parameters

  • TItem - The type of items the set contains.

Properties

  • readonly size - Gets the number of items in the set.
  • inherited readonly propertiesChanged - An event that is raised when one or more properties may have changed.
  • inherited readonly setChanged - An event that is raised when the set changed by adding or removing items.

Methods

  • [iterator] - Gets an iterator that provides each element in the set.
  • difference - Generates a set that contains all items in the current one, but not in the provided collection.
  • entries - Gets an iterator that provides each element in the set in an item-item tupple. Items in a set are their own key.
  • forEach - Iterates over the entire set executing the callback for each item.
  • has - Checks whether the provided item is in the set.
  • intersection - Generates a set that contains the items contained by both the current and provided collection.
  • isDisjointFrom - Checks whether there are no items common in both the current set and the provided collection.
  • isSubsetOf - Checks whether all items from the current set are contained by the provided collection.
  • isSupersetOf - Checks whether all items from the provided collection are contained by the current set.
  • keys - Gets an iterator that provides each element in the set, this is an alias for IReadOnlyObservableSet.values
  • symmetricDifference - Generates a set that contains all items from both the current and provided collection, but are not contained by both.
  • toSet - Converts the observable set to a native JavaScript Set.
  • union - Generates a set that contains all items from both the current and the provided collection.
  • values - Gets an iterator that provides each item in the set.

Implementations

Clone this wiki locally