UNPKG

@integromat/proto

Version:
55 lines 1.3 kB
"use strict"; /** * Warning. * * @param {String} message Warning message. * * @property {String} stack Call stack. * @property {String} message Warning message. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Warning = void 0; var Warning = /** @class */ (function () { function Warning(message) { this.name = 'Warning'; this.message = message; Error.captureStackTrace(this, this.constructor); } return Warning; }()); exports.Warning = Warning; /** * Warning toString. */ Object.defineProperty(Warning.prototype, 'toString', { configurable: true, writable: true, value: function () { return "".concat(this.name, ": ").concat(this.message); }, }); /** * Warning inspect. */ Object.defineProperty(Warning.prototype, 'inspect', { configurable: true, writable: true, value: function () { return "[".concat(this.name, ": ").concat(this.message, "]"); }, }); /** * Warning JSON serialization. */ Object.defineProperty(Warning.prototype, 'toJSON', { configurable: true, writable: true, value: function () { return { name: this.name, message: this.message, stack: this.stack, }; }, }); //# sourceMappingURL=warning.js.map