UNPKG

@constructorfleet/ultimate-govee

Version:

Library for interacting with Govee devices written in Typescript.

38 lines 1.57 kB
import { DeltaMap } from './delta-map.observable'; import { DeltaMapSettings, IdObject } from './types'; export declare class DeltaSet<V extends IdObject<K>, K = string> extends DeltaMap<K, V> { constructor(); constructor(entries: Iterable<V>); constructor(settings?: DeltaMapSettings<V>); constructor(entries: Iterable<V>, settings?: DeltaMapSettings<V>); /** * Process constructor content, can be overriden and extended in subclasses */ protected initializeContent(entries: Iterable<any>): void; /** * Adds or modifies an entry and notifies changes through _delta$_. * * If an existing entry is the same according to the _isEqual_ function, nothing is changed. */ add(entry: V): DeltaSet<V, K>; /** * Adds or modifies multiple entries at once and notifies changes through _delta$_. * * If an existing entry is the same according to the _isEqual_ function, nothing is changed. */ addMultiple(entries: Iterable<V>): void; /** * Redirect to _entry.add_ to guarantee integrity of the IdObject Map. * @override * @deprecated use _add(entry)_ instead */ set(_id: K, entry: V): any; /** * Replaces all existing entries with new entries. * - Adds _newEntries_ not existing in the current entries. * - Updates existing entries where _newEntries_ have changed (_isEqual_ function). * - Deletes entries not existing in _newEntries_. */ replace(entries: Iterable<V>): void; } //# sourceMappingURL=delta-set.observable.d.ts.map