Class ArrayObjectStore<S>
Type Parameters
- S extends BaseObjectEntryStore<any>
Hierarchy
- ArrayObjectStore (View Summary)
Index
Constructors
Accessors
Methods
Constructors
constructor
- new ArrayObjectStore<S extends BaseObjectEntryStore<any>>(
options: ArrayObjectStore.Options.Config<S>,
): ArrayObjectStore<S> Type Parameters
- S extends BaseObjectEntryStore<any>
Parameters
- options: ArrayObjectStore.Options.Config<S>
ArrayObjectStore options.
Returns ArrayObjectStore<S>
Accessors
Protected
_data
dataReducer
- get dataReducer(): DynArrayReducer<S>
Returns DynArrayReducer<S>
The data reducer.
length
- get length(): number
Returns number
The length of all data.
Static
EntryStore
- get EntryStore(): typeof ObjectEntryStore
Returns typeof ObjectEntryStore
The default object entry store constructor that can facilitate the creation of the required ArrayObjectStore.Options.Config.StoreClass and generic
T
type parameter.
Methods
[iterator]
- "[iterator]"(): IterableIterator<S>
Provide an iterator for public access to entry stores.
Returns IterableIterator<S>
iterator
clearEntries
createEntry
- createEntry(entryData: ExtractDataType<S>): S
Creates a new store from given data.
Parameters
- entryData: ExtractDataType<S>
Entry data.
Returns S
The store
- entryData: ExtractDataType<S>
deleteEntry
duplicateEntry
findEntry
getEntry
set
- set(updateList: ExtractDataType<S>[]): void
Sets the children store data by 'id', adds new entry store instances, or removes entries that are no longer in the update list.
Parameters
- updateList: ExtractDataType<S>[]
Returns void
subscribe
- subscribe(handler: Subscriber<S[]>): Unsubscriber
Parameters
- handler: Subscriber<S[]>
Callback function that is invoked on update / changes.
Returns Unsubscriber
Unsubscribe function.
- handler: Subscriber<S[]>
toJSON
updateSubscribers
- updateSubscribers(update?: boolean | ExtractDataType<S>): void
Updates subscribers.
Parameters
Optional
update: boolean | ExtractDataType<S>
Returns void
Store type.