ioc-check
Version:
Runtime checks for error free dependency injection.
24 lines • 799 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DependencyInjectionError = void 0;
const CustomError_1 = require("./CustomError");
/**
* Error that is emitted if a dependency injection failed.
*/
class DependencyInjectionError extends CustomError_1.CustomError {
/**
* Create a new dependency injection error.
* @param constructable The class that is the cause for the error
* @example
* class AClass {}
* throw new DependencyInjectionError(AClass);
* // => emits like
* // DependencyInjectionError: AClass
* // at ...
*/
constructor(constructable) {
super(constructable.name);
}
}
exports.DependencyInjectionError = DependencyInjectionError;
//# sourceMappingURL=DependencyInjectionError.js.map