Interface: BoundStore\<ModuleDefinition>
Defined in: types/BoundStore.ts:8
BoundStore is a proxy object around the target library store. It is provided as the 'store' to target module tasks.
Type Parameters
ModuleDefinition
ModuleDefinition extends BaseModule\<any, any, any>
Properties
commit
commit: \<
OutsideModuleDefinition,Key>(funcName, ...payload) =>void
Defined in: types/BoundStore.ts:12
Commit commits a state change to the underlying state management library.
Type Parameters
OutsideModuleDefinition
OutsideModuleDefinition extends BaseModule\<any, any, any> = ModuleDefinition
Key
Key extends string = string & keyof OutsideModuleDefinition["mutations"]
Parameters
funcName
Key | `${string}/${Key}`
payload
...ParametersExceptFirst\<OutsideModuleDefinition["mutations"][Key]>
Returns
void
dispatch
dispatch: (\<
Key>(funcName, ...payload) =>ReturnType\<ModuleDefinition["tasks"][Key]>) | (\<Key>(funcName, ...payload) =>ReturnType\<ModuleDefinition["tasks"][Key]>)
Defined in: types/BoundStore.ts:17
Dispatch runs a function which may have multiple commits-- this may be provided through the client library's task management, or it may be an implementation all its own.
makeModule
makeModule:
ModuleFactory
Defined in: types/BoundStore.ts:29
ModuleFactory function-- this function should create a new function in the underlying state library.
state
state:
ModuleDefinition["state"]
Defined in: types/BoundStore.ts:21
A getter that returns the state of the current module.
stateFor
stateFor: \<
OutsideModuleDefinition>(moduleName) =>OutsideModuleDefinition["state"]
Defined in: types/BoundStore.ts:25
A function that allows you to get the state of another module.
Type Parameters
OutsideModuleDefinition
OutsideModuleDefinition extends BaseModule\<any, any, any>
Parameters
moduleName
string
Returns
OutsideModuleDefinition["state"]