Effect Manager
EffectManager
Effect
Manager<Home, ProgramAction, SelfAction, SelfState, MyCmd, MySub>: { home: Home ; mapCmd: <A1, A2>( actionMapper: ( a1: A1 ) => A2 , cmd: Cmd < A1 > ) => Cmd < A2 > ; mapSub: <A1, A2>( actionMapper: ( a1: A1 ) => A2 , sub: Sub < A1 > ) => Sub < A2 > ; onEffects: ( dispatchProgram: Dispatch < ProgramAction > , dispatchSelf: Dispatch < SelfAction > , cmds: ReadonlyArray < MyCmd > , subs: ReadonlyArray < MySub > , state: SelfState ) => SelfState ; onSelfAction: ( dispatchProgram: Dispatch < ProgramAction > , dispatchSelf: Dispatch < SelfAction > , action: SelfAction , state: SelfState ) => SelfState ; setup: ( dispatchProgram: Dispatch < ProgramAction > , dispatchSelf: Dispatch < SelfAction > ) => ( ) => void }
Type parameters
Home = string
ProgramAction = unknown
SelfAction = unknown
SelfState = unknown
MyCmd: Cmd < ProgramAction , Home > = Cmd < ProgramAction , Home >
MySub: Sub < ProgramAction , Home > = Sub < ProgramAction , Home >
Type declaration
Readonly home: Home
Readonly mapCmd: <A1, A2>( actionMapper: ( a1: A1 ) => A2 , cmd: Cmd < A1 > ) => Cmd < A2 >
<A1, A2>( actionMapper: ( a1: A1 ) => A2 , cmd: Cmd < A1 > ) : Cmd < A2 >
Type parameters
Parameters
actionMapper: ( a1: A1 ) => A2
cmd: Cmd < A1 >
Returns Cmd < A2 >
Readonly mapSub: <A1, A2>( actionMapper: ( a1: A1 ) => A2 , sub: Sub < A1 > ) => Sub < A2 >
<A1, A2>( actionMapper: ( a1: A1 ) => A2 , sub: Sub < A1 > ) : Sub < A2 >
Type parameters
Parameters
actionMapper: ( a1: A1 ) => A2
sub: Sub < A1 >
Returns Sub < A2 >
Readonly onEffects: ( dispatchProgram: Dispatch < ProgramAction > , dispatchSelf: Dispatch < SelfAction > , cmds: ReadonlyArray < MyCmd > , subs: ReadonlyArray < MySub > , state: SelfState ) => SelfState
( dispatchProgram: Dispatch < ProgramAction > , dispatchSelf: Dispatch < SelfAction > , cmds: ReadonlyArray < MyCmd > , subs: ReadonlyArray < MySub > , state: SelfState ) : SelfState
Parameters
dispatchProgram: Dispatch < ProgramAction >
dispatchSelf: Dispatch < SelfAction >
cmds: ReadonlyArray < MyCmd >
subs: ReadonlyArray < MySub >
state: SelfState
Returns SelfState
Readonly onSelfAction: ( dispatchProgram: Dispatch < ProgramAction > , dispatchSelf: Dispatch < SelfAction > , action: SelfAction , state: SelfState ) => SelfState
( dispatchProgram: Dispatch < ProgramAction > , dispatchSelf: Dispatch < SelfAction > , action: SelfAction , state: SelfState ) : SelfState
Parameters
dispatchProgram: Dispatch < ProgramAction >
dispatchSelf: Dispatch < SelfAction >
action: SelfAction
state: SelfState
Returns SelfState
Readonly setup: ( dispatchProgram: Dispatch < ProgramAction > , dispatchSelf: Dispatch < SelfAction > ) => ( ) => void
( dispatchProgram: Dispatch < ProgramAction > , dispatchSelf: Dispatch < SelfAction > ) : ( ) => void
Parameters
Returns ( ) => void
Legend
Function with type parameter
Type alias with type parameter
A type that describes an effect manager that can be used by the "program".run function.