gateValue: {
    equals: (expected: unknown) => TourGatePredicate;
    matches: (pattern: RegExp) => TourGatePredicate;
    nonEmpty: () => TourGatePredicate;
    oneOf: (values: readonly unknown[]) => TourGatePredicate;
    truthy: () => TourGatePredicate;
} = ...

Ready-made predicates for the common value-gate cases, each reading ctx.value (the current value of the step's watched control). Compose your own for anything more specific — a predicate is just (ctx: TourGateContext) => boolean.

Type declaration

  • equals: (expected: unknown) => TourGatePredicate

    Satisfied when the control value strictly equals expected.

  • matches: (pattern: RegExp) => TourGatePredicate

    Satisfied when the (string) control value matches pattern. The global flag is stripped so repeated evaluations are not affected by the shared RegExp.lastIndex.

  • nonEmpty: () => TourGatePredicate

    Satisfied when the control value is not null/undefined/blank/whitespace.

  • oneOf: (values: readonly unknown[]) => TourGatePredicate

    Satisfied when the control value is one of values.

  • truthy: () => TourGatePredicate

    Satisfied when the control value is JS-truthy.