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