UNPKG

tsioc

Version:

tsioc is AOP, Ioc container, via typescript decorator

41 lines (39 loc) 1.57 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var ActionComposite_1 = require("./ActionComposite"); var index_1 = require("../../utils/index"); var CoreActions_1 = require("./CoreActions"); /** * Inject DrawType action. * * @export * @class SetPropAction * @extends {ActionComposite} */ var ComponentInitAction = /** @class */ (function (_super) { __extends(ComponentInitAction, _super); function ComponentInitAction() { return _super.call(this, CoreActions_1.CoreActions.componentInit) || this; } ComponentInitAction.prototype.working = function (container, data) { if (data.targetType && data.target) { var component = data.target; if (index_1.isFunction(component.onInit)) { container.syncInvoke(data.targetType, 'onInit', data.target); } } }; return ComponentInitAction; }(ActionComposite_1.ActionComposite)); exports.ComponentInitAction = ComponentInitAction; //# sourceMappingURL=../../sourcemaps/core/actions/ComponentInitAction.js.map