Interface ReadonlyObservableMap<TKey, TVal>

An immutable Map where the state and values can be observed

interface ReadonlyObservableMap<TKey, TVal> {
    empty: boolean;
    empty$: Observable<boolean>;
    size: number;
    size$: Observable<number>;
    value: ReadonlyMap<TKey, TVal>;
    value$: Observable<ReadonlyMap<TKey, TVal>>;
    [iterator](): Iterator<[TKey, TVal], any, undefined>;
    get(key: TKey): undefined | TVal;
    get$(key: TKey): Observable<undefined | TVal>;
    has(key: TKey): boolean;
    has$(key: TKey): Observable<boolean>;
    subscribe(observer: Partial<Observer<ReadonlyMap<TKey, TVal>>>): Unsubscribable;
}

Type Parameters

  • TKey
  • TVal

Hierarchy

  • Iterable<[TKey, TVal]>
  • Subscribable<ReadonlyMap<TKey, TVal>>
    • ReadonlyObservableMap

Implemented by

Properties

empty: boolean

True if the collection is empty

empty$: Observable<boolean>

An observable emitting true if the collection is empty

size: number

The number of items in the collection

size$: Observable<number>

An observable emitting the number of items in the collection

value: ReadonlyMap<TKey, TVal>

The inner non-observable map

value$: Observable<ReadonlyMap<TKey, TVal>>

An observable emitting the inner non-observable map

Methods

  • Returns Iterator<[TKey, TVal], any, undefined>

  • Create am observable emitting true if a key exists in the collection

    Parameters

    Returns Observable<boolean>

  • Parameters

    • observer: Partial<Observer<ReadonlyMap<TKey, TVal>>>

    Returns Unsubscribable