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