text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  var index_1 = require("../index");
  /**
   * Specifies a given middleware to be used for controller or controller action BEFORE the action executes.
   * Must be set to controller action or controller class.
   */
  function UseBefore() {
      var middlewares = [];
      for (var _i = 0; _i < arguments.length; _i++) {
          middlewares[_i] = arguments[_i];
      }
      return function (objectOrFunction, methodName) {
          middlewares.forEach(function (middleware) {
              index_1.getMetadataArgsStorage().uses.push({
                  target: methodName ? objectOrFunction.constructor : objectOrFunction,
                  method: methodName,
                  middleware: middleware,
                  afterAction: false
              });
          });
      };
  }
  exports.UseBefore = UseBefore;
  //# sourceMappingURL=UseBefore.js.map