Skip to content

update

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

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

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

Usage:

setup(machine)(update(fn))
Type Parameter
T extends HasMethod<"update">
ParameterType
config[MiddlewareFunc<Parameters<MethodOf<T, "update">>[0]>]

(target: T): DisposeFunc

ParameterType
targetT

DisposeFunc