maestro-cli-roku
Version:
command line tools for maestro-roku projects
32 lines (31 loc) • 1.4 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var FileFeedbackType;
(function (FileFeedbackType) {
FileFeedbackType["Info"] = "Info";
FileFeedbackType["Warning"] = "Warning";
FileFeedbackType["Error"] = "Error";
FileFeedbackType["Verbose"] = "Verbose";
})(FileFeedbackType = exports.FileFeedbackType || (exports.FileFeedbackType = {}));
var FileFeedback = /** @class */ (function () {
function FileFeedback(file, feedbackType, message, line, character) {
this.file = file;
this.feedbackType = feedbackType;
this.message = message;
this.line = line;
this.character = character;
}
FileFeedback.prototype.toString = function () {
var fileName = this.file ? this.file.pkgPath : 'No file';
var lineText = this.line ? this.line.toString() : '';
var charText = this.character ? this.character.toString() : '';
var locationText = lineText && charText ? "(" + lineText + ":" + charText + ")" : '';
// return `${this.feedbackType.toString()} - ${fileName}${locationText} ${this.message}`;
return " " + this.feedbackType.toString() + " - " + fileName + locationText + ": " + this.message;
};
FileFeedback.prototype.throw = function () {
throw new Error(this.toString());
};
return FileFeedback;
}());
exports.FileFeedback = FileFeedback;