@malagu/core
Version:
14 lines • 712 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Aspect = void 0;
const aop_protocol_1 = require("../aop/aop-protocol");
const component_1 = require("./component");
const Aspect = (adviceOrAspectOption) => (target) => {
const option = (0, component_1.parseComponentOption)(target, adviceOrAspectOption);
option.id = Array.isArray(option.id) ? option.id[1] : option.id;
option.pointcut = option.pointcut || component_1.COMPONENT_TAG;
option.tag = { tag: aop_protocol_1.AOP_TAG, value: option.pointcut };
(0, component_1.applyComponentDecorator)(Object.assign({ proxy: false }, option), target);
};
exports.Aspect = Aspect;
//# sourceMappingURL=aspect.js.map