@epikodelabs/actionstack / registerModule
Function: registerModule()
registerModule<
State,ActionTypes,Actions,Selectors,Dependencies>(store, ...modules):FeatureModule<State,ActionTypes,Actions,Selectors,Dependencies>[]
Defined in: module.ts:347
Registers one or more modules into the store.
- If multiple modules are provided, calls
store.populate()for batch registration. - If a single module is provided, calls
store.loadModule()to initialize it.
Type Parameters
State
State
Module state type.
ActionTypes
ActionTypes extends string
Action string union.
Actions
Actions extends Record<string, ActionCreator<ActionTypes> | (...args) => any>
Shape of module actions.
Selectors
Selectors extends Record<string, (state) => any>
Shape of module selectors.
Dependencies
Dependencies extends Record<string, any> = { }
Shape of module dependencies.
Parameters
store
Store<any>
The store instance where modules are registered.
modules
...FeatureModule<State, ActionTypes, Actions, Selectors, Dependencies>[]
One or more modules to register.
Returns
FeatureModule<State, ActionTypes, Actions, Selectors, Dependencies>[]
The modules that were passed in.