Skip to content

update

const update: <T>(…config: [MiddlewareFunc<Parameters<MethodOf<T, "update">>[0]>]) => (target: T) => DisposeFunc

Defined in: state-machine-hooks.ts:121

Type Parameter
T extends HasMethod<"update">
ParameterType
config[MiddlewareFunc<Parameters<MethodOf<T, "update">>[0]>]

(target: T): DisposeFunc

ParameterType
targetT

DisposeFunc

update Enhances the update lifecycle method of a StateMachine. Returns a disposer to undo the enhancement. See StateMachine.update.

Usage:

setup(machine)(update(fn))