Interface ReadonlyObservableSet<T>

An immutable Set where the state and values can be observed

interface ReadonlyObservableSet<T> {
    array: readonly T[];
    array$: Observable<readonly T[]>;
    empty: boolean;
    empty$: Observable<boolean>;
    size: number;
    size$: Observable<number>;
    value: ReadonlySet<T>;
    value$: Observable<ReadonlySet<T>>;
    [iterator](): Iterator<T, any, undefined>;
    has(key: T): boolean;
    has$(key: T): Observable<boolean>;
    subscribe(observer: Partial<Observer<ReadonlySet<T>>>): Unsubscribable;
}

Type Parameters

  • T

Hierarchy

  • Iterable<T>
  • Subscribable<ReadonlySet<T>>
    • ReadonlyObservableSet

Implemented by

Properties

array: readonly T[]

The values of the set as an array

array$: Observable<readonly T[]>

An observable emitting the values of the set as an array

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: ReadonlySet<T>

The inner non-observable Set

value$: Observable<ReadonlySet<T>>

An observable emitting the inner non-observable Set

Methods

  • Returns Iterator<T, any, undefined>

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

    Parameters

    • key: T

    Returns Observable<boolean>

  • Parameters

    • observer: Partial<Observer<ReadonlySet<T>>>

    Returns Unsubscribable