Options
All
  • Public
  • Public/Protected
  • All
Menu

Extends May to notify observers when entries are added or removed.

export
class

ObservableMap

extends

{Map}

implements

{IObservableCollection<[TKey, TEntity]>}

template

TKey

template

TEntity

Type parameters

  • TKey

  • TEntity

Hierarchy

  • Map<TKey, TEntity>
    • ObservableMap

Implements

Index

Constructors

constructor

  • new ObservableMap(...entries: [TKey, TEntity][]): ObservableMap
  • Creates an instance of ObservableMap.

    memberof

    ObservableMap

    Parameters

    • Rest ...entries: [TKey, TEntity][]

      One or more entries.

    Returns ObservableMap

Properties

Private _addListeners

_addListeners: Subject<INotifyInfo>[] = []

Private _removeListeners

_removeListeners: Subject<INotifyInfo>[] = []

Static Map

Map: MapConstructor

Static __@toStringTag

__@toStringTag: "Map"

Static size

size: number

Accessors

addListeners

addListeners:

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

readonly
type

{Subject[]}

memberof

ObservableMap

removeListeners

removeListeners:

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

readonly
type

{Subject[]}

memberof

ObservableMap

Methods

add

  • add(key: TKey, value: TEntity): this
  • Add an entry to the collection.

    memberof

    ObservableMap

    Parameters

    • key: TKey
    • value: TEntity

    Returns this

addRange

  • addRange(...entries: [TKey, TEntity][]): this
  • Add one or more entries to the collection.

    memberof

    ObservableMap

    Parameters

    • Rest ...entries: [TKey, TEntity][]

    Returns this

delete

  • delete(key: TKey): boolean
  • Remove an entry from the collection.

    memberof

    ObservableMap

    Parameters

    • key: TKey

    Returns boolean

deleteRange

  • deleteRange(...keys: TKey[]): boolean
  • Remove one or more entries from the collection.

    memberof

    ObservableMap

    Parameters

    • Rest ...keys: TKey[]

    Returns boolean

Static __@iterator

  • __@iterator(): IterableIterator<[TKey, TEntity]>
  • Returns IterableIterator<[TKey, TEntity]>

Static clear

  • clear(): void
  • Returns void

Static delete

  • delete(key: TKey): boolean
  • Parameters

    • key: TKey

    Returns boolean

Static entries

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

Static forEach

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

    • callbackfn: function
        • (value: TEntity, key: TKey, map: Map<TKey, TEntity>): void
        • Parameters

          • value: TEntity
          • key: TKey
          • map: Map<TKey, TEntity>

          Returns void

    • Optional thisArg: any

    Returns void

Static get

  • get(key: TKey): TEntity | undefined
  • Parameters

    • key: TKey

    Returns TEntity | undefined

Static has

  • has(key: TKey): boolean
  • Parameters

    • key: TKey

    Returns boolean

Static keys

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

Static set

  • set(key: TKey, value: TEntity): this
  • Parameters

    • key: TKey
    • value: TEntity

    Returns this

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