Skip to content
Version: xstate@5.0.0

and() function​

Signature:

export declare function and<TContext extends MachineContext, TExpressionEvent extends EventObject, TParams extends ParameterizedObject['params'] | undefined, TGuard extends ParameterizedObject>(guards: ReadonlyArray<Guard<TContext, TExpressionEvent, TParams, NoInfer<TGuard>>>): GuardPredicate<TContext, TExpressionEvent, TParams, TGuard>;

Parameters​

ParameterTypeDescription
guardsReadonlyArray<Guard<TContext, TExpressionEvent, TParams, NoInfer<TGuard>>>

Returns:

GuardPredicate<TContext, TExpressionEvent, TParams, TGuard>