couch-kit
    Preparing search index...

    Function actionValidator

    • Middleware that validates actions against a schema before they reach the reducer. Invalid actions are silently dropped (with a console warning).

      Internal actions are never validated — they always pass through.

      const validator = actionValidator<GameState, GameAction>({
      SCORE: (action) => action.payload > 0,
      });

      Type Parameters

      Parameters

      Returns Middleware<S, A>