tsioc
Version:
tsioc is AOP, Ioc container, via typescript decorator
41 lines (39 loc) • 1.64 kB
JavaScript
;
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 ComponentBeforeInitAction = /** @class */ (function (_super) {
__extends(ComponentBeforeInitAction, _super);
function ComponentBeforeInitAction() {
return _super.call(this, CoreActions_1.CoreActions.componentBeforeInit) || this;
}
ComponentBeforeInitAction.prototype.working = function (container, data) {
if (data.targetType && data.target) {
var component = data.target;
if (index_1.isFunction(component.beforeInit)) {
container.syncInvoke(data.targetType, 'beforeInit', data.target);
}
}
};
return ComponentBeforeInitAction;
}(ActionComposite_1.ActionComposite));
exports.ComponentBeforeInitAction = ComponentBeforeInitAction;
//# sourceMappingURL=../../sourcemaps/core/actions/ComponentBeforeInitAction.js.map