stepdad
Version:
Stupid simple and lightweight dependency injection
11 lines (10 loc) • 337 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.dad = void 0;
const Injector_1 = require("./Injector");
const dad = (target) => {
const injector = new Injector_1.Injector();
const entryClass = injector.resolve(target);
return [entryClass, () => injector.release()];
};
exports.dad = dad;