text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WrappedNodeRedisMultiImpl = void 0;
  const nodeRedis = require("redis");
  const flatten_1 = require("../flatten");
  const util_1 = require("util");
  const WrappedNodeRedisMultiImpl = class _WrappedNodeRedisMulti {
      constructor(multi) {
          this.nodeRedisMulti = multi;
          this.exec = util_1.promisify(multi.exec.bind(multi));
          this.exec_atomic = util_1.promisify(multi.exec.bind(multi));
      }
      static create(multi) {
          return new exports.WrappedNodeRedisMultiImpl(multi);
      }
  };
  exports.WrappedNodeRedisMultiImpl = WrappedNodeRedisMultiImpl;
  Object.keys(nodeRedis.Multi.prototype)
      .filter(method => method !== "exec" && method !== "exec_atomic")
      .forEach(method => {
      exports.WrappedNodeRedisMultiImpl.prototype[method] = function (...args) {
          this.nodeRedisMulti[method](...flatten_1.flattenDeep(args));
          return this;
      };
  });
  //# sourceMappingURL=multi.js.map