Class ObjectEntryStore<T>Abstract
Type Parameters
- T extends BaseArrayObject = BaseArrayObject
Implements
Index
Constructors
constructor
Type Parameters
- T extends BaseArrayObject = BaseArrayObject
Parameters
- data: T
Returns ObjectEntryStore<T>
Accessors
Protected_data
Returns T
The object data tracked by this store.
id
- get id(): string
Returns string
The ID attribute in object data tracked by this store.
Methods
Protected_updateSubscribers
Update subscribers of this store. Useful for child implementations.
Returns void
Abstractset
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
Parameters
- handler: Subscriber<T>
Callback function that is invoked on update / changes.
Returns Unsubscriber
Unsubscribe function.
- handler: Subscriber<T>
toJSON
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.
Staticduplicate
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.