text: // LICENSE : MIT
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  var TextlintRuleError = /** @class */ (function () {
      /**
       * RuleError is like Error object.
       * It's used for adding to TextlintResult.
       * @param message error message should start with lowercase letter
       * @param [paddingLocation] - the object has padding {line, column} for actual error reason
       * @constructor
       */
      function TextlintRuleError(message, paddingLocation) {
          this.message = message;
          if (typeof paddingLocation === "object") {
              /**
               * padding lineNumber
               * @type {number}
               */
              this.line = paddingLocation.line;
              /**
               * padding column
               * @type {number}
               */
              this.column = paddingLocation.column;
              /**
               * padding index
               * @type {number}
               */
              this.index = paddingLocation.index;
              /**
               * fixCommand object
               * @type {TextlintRuleContextFixCommand}
               */
              this.fix = paddingLocation.fix;
          }
          else if (typeof paddingLocation === "number") {
              // this is deprecated
              // should pass padding as object.
              this.column = paddingLocation;
          }
      }
      TextlintRuleError.prototype.toString = function () {
          return JSON.stringify({
              message: this.message,
              line: this.line,
              column: this.column,
              index: this.index,
              fix: this.fix
          });
      };
      return TextlintRuleError;
  }());
  exports.TextlintRuleError = TextlintRuleError;
  //# sourceMappingURL=TextlintRuleError.js.map