Class WorldArrayObjectStore<S>
Type Parameters
- S extends BaseObjectEntryStore<any>
Store type.
Hierarchy
- CrudArrayObjectStore<S>
- WorldArrayObjectStore (View Summary)
Index
Constructors
Accessors
Methods
Constructors
constructor
- new WorldArrayObjectStore<S extends BaseObjectEntryStore<any>>(
options: WorldArrayObjectStore.Options.Config<S> & CrudArrayObjectStore.Options.Config<
S,
>,
): WorldArrayObjectStore<S> Type Parameters
- S extends BaseObjectEntryStore<any>
Parameters
- options: WorldArrayObjectStore.Options.Config<S> & CrudArrayObjectStore.Options.Config<S>
WorldArrayObjectStore Options.
Returns WorldArrayObjectStore<S>
Accessors
Protected
_data
dataReducer
- get dataReducer(): DynArrayReducer<S>
Returns DynArrayReducer<S>
The data reducer.
key
- get key(): string
Returns string
The Foundry game setting key.
length
- get length(): number
Returns number
The length of all data.
namespace
- get namespace(): string
Returns string
The Foundry game setting namespace.
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>
Returns S
Associated store with entry data.
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, but provides special handling when a
crudDispatch
function is attached. Whenupdate
is an object with a valid UUIDv4 string as the id property thecrudDispatch
function is invoked along with the data payload.Parameters
Optional
update: boolean | ExtractDataType<S>A boolean indicating that subscribers should be notified otherwise
Returns void
Defines a CrudArrayObjectStore with streamlined configuration through TJSGameSettings to register a world game setting. WorldArrayObjectStore is automatically associated as the store receiving updates with the associated game setting.