resolve-tspaths
Version:
Transform path mappings in your compiled Typescript code
41 lines (40 loc) • 1.27 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.InvalidAliasError = exports.TSConfigPropertyError = exports.FileNotFoundError = exports.FileError = exports.StepError = void 0;
class StepError extends Error {
constructor(step, message) {
super(message);
this.step = step;
}
}
exports.StepError = StepError;
class FileError extends StepError {
constructor(step, path, message) {
super(step, `Error processing ${path}: ${message}`);
this.step = step;
this.path = path;
}
}
exports.FileError = FileError;
class FileNotFoundError extends FileError {
constructor(step, path) {
super(step, path, `Not found`);
}
}
exports.FileNotFoundError = FileNotFoundError;
class TSConfigPropertyError extends StepError {
constructor(step, property) {
super(step, `${property} is not set in tsconfig`);
this.step = step;
this.property = property;
}
}
exports.TSConfigPropertyError = TSConfigPropertyError;
class InvalidAliasError extends StepError {
constructor(step, alias) {
super(step, `The alias ${alias} is not permitted`);
this.step = step;
this.alias = alias;
}
}
exports.InvalidAliasError = InvalidAliasError;