Options
All
  • Public
  • Public/Protected
  • All
Menu

Extends Set to notify observers when entities are added or removed.

export
class

ObservableSet

extends

{Set}

implements

{IObservableCollection}

template

TEntity

Type parameters

  • TEntity

Hierarchy

  • Set<TEntity>
    • ObservableSet

Implements

Index

Constructors

constructor

  • Creates an instance of ObservableSet.

    memberof

    ObservableSet

    Parameters

    • Rest ...items: TEntity[]

      One or more entities.

    Returns ObservableSet

Properties

Private _addListeners

_addListeners: Subject<INotifyInfo>[] = []

Private _removeListeners

_removeListeners: Subject<INotifyInfo>[] = []

Static Set

Set: SetConstructor

Static __@toStringTag

__@toStringTag: "Set"

Static size

size: number

Accessors

addListeners

addListeners:

Array of listeners to observe when entities are added to the collection.

readonly
type

{Subject[]}

memberof

ObservableSet

removeListeners

removeListeners:

Array of listeners to observe when entities are removed from the collection.

readonly
type

{Subject[]}

memberof

ObservableSet

Methods

add

  • add(value: TEntity): this
  • Add an entity to the collection.

    memberof

    ObservableSet

    Parameters

    • value: TEntity

    Returns this

addRange

  • addRange(...values: TEntity[]): this
  • Add one or more entities to the collection.

    memberof

    ObservableSet

    Parameters

    • Rest ...values: TEntity[]

    Returns this

delete

  • delete(value: TEntity): boolean
  • Remove an entity from the collection.

    memberof

    ObservableSet

    Parameters

    • value: TEntity

    Returns boolean

deleteRange

  • deleteRange(...values: TEntity[]): boolean
  • Remove one or more entities from the collection.

    memberof

    ObservableSet

    Parameters

    • Rest ...values: TEntity[]

    Returns boolean

Static __@iterator

  • __@iterator(): IterableIterator<TEntity>
  • Returns IterableIterator<TEntity>

Static add

  • add(value: TEntity): this
  • Parameters

    • value: TEntity

    Returns this

Static clear

  • clear(): void
  • Returns void

Static delete

  • delete(value: TEntity): boolean
  • Parameters

    • value: TEntity

    Returns boolean

Static entries

  • entries(): IterableIterator<[TEntity, TEntity]>
  • Returns IterableIterator<[TEntity, TEntity]>

Static forEach

  • forEach(callbackfn: function, thisArg?: any): void
  • Parameters

    • callbackfn: function
        • (value: TEntity, value2: TEntity, set: Set<TEntity>): void
        • Parameters

          • value: TEntity
          • value2: TEntity
          • set: Set<TEntity>

          Returns void

    • Optional thisArg: any

    Returns void

Static has

  • has(value: TEntity): boolean
  • Parameters

    • value: TEntity

    Returns boolean

Static keys

  • keys(): IterableIterator<TEntity>
  • Returns IterableIterator<TEntity>

Static values

  • values(): IterableIterator<TEntity>
  • Returns IterableIterator<TEntity>

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc