zents
Version:
ZenTS is a Node.js & TypeScript MVC-Framework for building rich web applications, released as free and open-source software under the MIT License. It is designed for building web applications with modern tools and design patterns.
16 lines • 712 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DependenciesAction = void 0;
const AbstractAction_1 = require("./AbstractAction");
const enums_1 = require("../../types/enums");
class DependenciesAction extends AbstractAction_1.AbstractAction {
run(instance) {
var _a;
const dependencies = (_a = Reflect.getMetadata(enums_1.REFLECT_METADATA.DEPENDENCIES, instance)) !== null && _a !== void 0 ? _a : [];
for (const { dependency, propertyKey } of dependencies) {
instance[propertyKey] = this.injector.inject(dependency, []);
}
}
}
exports.DependenciesAction = DependenciesAction;
//# sourceMappingURL=DependenciesAction.js.map