Skip to content

combineGuards

combineGuards<E>(first: (value: E) => boolean, next: (value: E) => boolean): (value: E) => boolean

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

Combines two guard functions for a state machine transition. Both guards must return true for the transition to proceed.

Usage:

combineGuards(first, next)(event)
Type Parameter
E extends TransitionEvent<unknown, unknown>
ParameterType
first(value: E) => boolean
next(value: E) => boolean

(value: E): boolean

ParameterType
valueE

boolean