Skip to content

notify

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

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

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

(target: T): DisposeFunc

ParameterType
targetT

DisposeFunc

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

Usage:

setup(machine)(notify(fn))