@hyperfrontend/state-machine/modelsmodels
Shared type definitions for state-machine state, actions, and reducers.
This entry point re-exports the cross-cutting types consumed by the runtime modules (store, reducer, selectors, state-change). Consumers writing their own action handlers or reducers import from here to stay aligned with the shapes the rest of the library expects, without having to dig into module-private files.
API Reference§
◈ Interfaces
Base action with a type discriminator
Properties
Derived state computed from core state flags
Properties
Map of action type constants to their handler functions
Properties
§
process cancelled:(state: State, action: { payload: unknown; type: string }) => StateHandler for cancel action
§
process completed successfully:(state: State, action: { payload: unknown; type: string }) => StateHandler for success action
§
process failed:(state: State, action: { error: any; type: string }) => StateHandler for fail action
◆ Types
Event name type derived from the event constant object
type Event = indexedAccessFunction that derives full DerivedState from State
type StateDeriver = (state: State) => DerivedStateFunction that derives a single status boolean from state
type StateStatusDeriver = (state: State) => boolean