Class ObjectEntryStore<T>Abstract
Type Parameters
- T extends BaseArrayObject = BaseArrayObject
Implements
Index
Constructors
constructor
- new ObjectEntryStore<T extends BaseArrayObject = BaseArrayObject>(
data: T,
): ObjectEntryStore<T> Type Parameters
- T extends BaseArrayObject = BaseArrayObject
Parameters
- data: T
Returns ObjectEntryStore<T>
Accessors
Protected
_data
id
- get id(): string
Returns string
The ID attribute in object data tracked by this store.
Methods
Protected
_updateSubscribers
Abstract
set
- set(data: T): void
To be implemented by child implementations as required by the MinimalWritable contract. You must manually invoke ObjectEntryStore._updateSubscribers to notify subscribers.
Parameters
- data: T
Data to set to store.
Returns void
- data: T
subscribe
- subscribe(handler: Subscriber<T>): Unsubscriber
Parameters
- handler: Subscriber<T>
Callback function that is invoked on update / changes.
Returns Unsubscriber
Unsubscribe function.
- handler: Subscriber<T>
toJSON
- toJSON(): T
Returns T
A JSON data object for the backing data. The default implementation directly returns the backing private data object. You may override this method to clone the data via ObjectEntryStore._data.
Static
duplicate
- duplicate(data: object, arrayStore: ArrayObjectStore<any>): void
Invoked by ArrayObjectStore to provide custom duplication. Override this static method in your entry store.
Parameters
- data: object
A copy of local data w/ new ID already set.
- arrayStore: ArrayObjectStore<any>
The source ArrayObjectStore instance.
Returns void
- data: object
Provides a base implementation for store entries in ArrayObjectStore.
In particular providing the required getting / accessor for the 'id' property.