@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) • 607 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function InjectedExactlyIntoTypes(resolutionContext, dependencyMetadata) {
var expectedFunctions = [];
for (var _i = 2; _i < arguments.length; _i++) {
expectedFunctions[_i - 2] = arguments[_i];
}
return !!expectedFunctions.find(function (expectedFunction) {
var aliasIndex = resolutionContext.targetResolutionStack.indexOf(expectedFunction);
return aliasIndex > 0 && aliasIndex === (resolutionContext.targetResolutionStack.length - 1);
});
}
exports.default = InjectedExactlyIntoTypes;