@epikodelabs/actionstack / FeatureModule
Interface: FeatureModule<State, ActionTypes, Actions, Selectors, Dependencies>
Defined in: types.ts:344
Represents a feature module that organizes state, logic, and dependencies for a specific part of an application.
Type Parameters
State
State = any
The type of the feature state slice.
ActionTypes
ActionTypes extends string = string
The union type of action type strings.
Actions
Actions extends Record<string, (...args) => Action<any>> = any
The shape of action creator functions.
Selectors
Selectors extends Record<string, (state) => any> = any
The shape of selector functions.
Dependencies
Dependencies = any
The type representing dependencies required by the feature.
Indexable
[key: string]: any
Properties
slice
readonlyslice:string
Defined in: types.ts:352
A unique identifier string for the feature's state slice in the store.
initialState
readonlyinitialState:State
Defined in: types.ts:353
The initial state value for this feature slice.
dependencies?
readonlyoptionaldependencies:Dependencies
Defined in: types.ts:354
loaded$
readonlyloaded$:Subject<void>
Defined in: types.ts:355
destroyed$
readonlydestroyed$:Subject<void>
Defined in: types.ts:356
data$
readonlydata$:Streams<Selectors>
Defined in: types.ts:357
actions
readonlyactions:Actions
Defined in: types.ts:358
An object containing action creator functions.
selectors
readonlyselectors:Selectors
Defined in: types.ts:359
An object containing selector functions to derive data from the state.
init()
init: (
store) =>FeatureModule<State,ActionTypes,Actions,Selectors,Dependencies>
Defined in: types.ts:361
Parameters
store
Store<any>
Returns
FeatureModule<State, ActionTypes, Actions, Selectors, Dependencies>
configure()
configure: (
store) =>FeatureModule<State,ActionTypes,Actions,Selectors,Dependencies>
Defined in: types.ts:362
Parameters
store
Store<State>
Returns
FeatureModule<State, ActionTypes, Actions, Selectors, Dependencies>
destroy()
destroy: (
clearState?) =>FeatureModule<State,ActionTypes,Actions,Selectors,Dependencies>
Defined in: types.ts:363
Parameters
clearState?
boolean
Returns
FeatureModule<State, ActionTypes, Actions, Selectors, Dependencies>