Skip to content

before

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

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

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

Usage:

setup(machine)(before(ev => {}))
Type Parameter
T extends HasMethod<"before">
ParameterType
config[AbortableEventHandler<Parameters<MethodOf<T, "before">>[0]>]

(target: T): DisposeFunc

ParameterType
targetT

DisposeFunc