@jems/di
Version:
An implementation of IoC pattern based on dependency injection that allows you to granulate and decouple your libraries or applications. Wrote using SOLID principles and a variety OOP patterns implementations.
14 lines (13 loc) • 597 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function InjectedExactlyIntoAliases(resolutionContext, dependencyMetadata) {
var expectedAliases = [];
for (var _i = 2; _i < arguments.length; _i++) {
expectedAliases[_i - 2] = arguments[_i];
}
return !!expectedAliases.find(function (expectedAlias) {
var aliasIndex = resolutionContext.aliasResolutionStack.indexOf(expectedAlias);
return aliasIndex > 0 && aliasIndex === (resolutionContext.aliasResolutionStack.length - 1);
});
}
exports.default = InjectedExactlyIntoAliases;