Function transactionMiddleware

  • Creates a transaction middleware, which reverts changes made by an action / child actions when the root action throws an exception by applying inverse patches.

    Type Parameters

    Parameters

    • target: {
          actionName: keyof M;
          model: M;
      }

      Object with the root target model object (model) and root action name (actionName).

      • actionName: keyof M
      • model: M

    Returns ActionMiddlewareDisposer

    The middleware disposer.

    M Model