alpha-dic
Version:
Asynchronous dependency injection container
20 lines (19 loc) • 565 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromValue = exports.fromFactory = exports.fromConstructor = void 0;
function fromConstructor(constructor) {
return function createFromConstructor(...args) {
return new constructor(...args);
};
}
exports.fromConstructor = fromConstructor;
function fromFactory(factory) {
return factory;
}
exports.fromFactory = fromFactory;
function fromValue(value) {
return function createServiceFromValue() {
return value;
};
}
exports.fromValue = fromValue;
;