interface Config<S extends BaseObjectEntryStore<any>> {
    childDebounce?: number;
    crudDispatch?: CrudDispatch<ExtractDataType<S>>;
    dataReducer?: boolean;
    defaultData?: ExtractDataType<S>[];
    extraData?: object;
    gameSettings?: TJSGameSettings;
    key: string;
    manualUpdate?: boolean;
    namespace: string;
    StoreClass: new (...args: any[]) => S;
}

Type Parameters

Hierarchy

Properties

childDebounce?: number

An integer between and including 0 - 1000; a debounce time in milliseconds for child store subscriptions to invoke ArrayObjectStore.updateSubscribers notifying subscribers to this array store. Default value: 250.

crudDispatch?: CrudDispatch<ExtractDataType<S>>

Optional dispatch function to receive C(R)UD updates on create, update, delete actions.

dataReducer?: boolean

When true a DynArrayReducer will be instantiated wrapping store data and accessible from ArrayObjectStore.dataReducer; default value: false.

defaultData?: ExtractDataType<S>[]

When an instance of TJSGameSettings is defined and automatic game setting registered you may provide default data for the Foundry game setting.

extraData?: object

Optional additional data that is dispatched with CrudDispatch callbacks.

gameSettings?: TJSGameSettings

An instance of TJSGameSettings. If provided a world game setting will be automatically registered for the given namespace and key with this instance as the associated game setting store.

key: string

Game setting 'key' field.

manualUpdate?: boolean

When true ArrayObjectStore.updateSubscribers must be invoked with a single boolean parameter for subscribers to be updated; default value: false.

namespace: string

Game setting 'namespace' field.

StoreClass: new (...args: any[]) => S

The entry store class that is instantiated.