UNPKG

http-problem-details-mapper

Version:
16 lines 587 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ErrorMapper = void 0; class ErrorMapper { constructor(ErrorType) { if (this.constructor === ErrorMapper) { throw new TypeError('Can not construct abstract class.'); } if (this.mapError === ErrorMapper.prototype.mapError) { throw new TypeError(`Please implement abstract method 'mapError' in ${this.constructor.name}.`); } this.error = ErrorType.name; } } exports.ErrorMapper = ErrorMapper; //# sourceMappingURL=IErrorMapper.js.map