Skip to content
Version: xstate@5.0.0

or() function​

Signature:

export declare function or<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>