effect
effect<
T
>(…config
: [EffectFunc
<Parameters
<MethodOf
<T
,"effect"
>>[0
]>]): (target
:T
) =>DisposeFunc
Defined in: state-machine-hooks.ts:148
effect
Enhances the effect
lifecycle method of a StateMachine.
Returns a disposer to undo the enhancement.
See StateMachine.effect.
Usage:
setup(machine)(effect(fn))
Type Parameters
Section titled “Type Parameters”Type Parameter |
---|
T extends HasMethod <"effect" > |
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
…config | [EffectFunc <Parameters <MethodOf <T , "effect" >>[0 ]>] |
Returns
Section titled “Returns”(
target
:T
):DisposeFunc
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
target | T |