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 Parameters
Section titled “Type Parameters”Type Parameter |
---|
E extends TransitionEvent <unknown , unknown > |
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
first | (value : E ) => boolean |
next | (value : E ) => boolean |
Returns
Section titled “Returns”(
value
:E
):boolean
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
value | E |
Returns
Section titled “Returns”boolean