Interface ReadonlySignalMap<TKey, TVal>

An immutable Map where the state and values are accessible as signals

interface ReadonlySignalMap<TKey, TVal> {
    empty: Signal<boolean>;
    size: Signal<number>;
    value: Signal<ReadonlyMap<TKey, TVal>>;
    [iterator](): Iterator<[TKey, TVal], any, undefined>;
    get(key: TKey): Signal<undefined | TVal>;
    has(key: TKey): Signal<boolean>;
}

Type Parameters

  • TKey
  • TVal

Hierarchy

Implemented by

Properties

Methods

Properties

empty: Signal<boolean>

A signal emitting true if the collection is empty

size: Signal<number>

A signal emitting the number of items in the collection

value: Signal<ReadonlyMap<TKey, TVal>>

A signal emitting the inner non-signal map

Methods

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