UNPKG

@malagu/core

Version:
18 lines 833 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.applyServiceDecorator = exports.Service = exports.SERVICE_TAG = void 0; const component_1 = require("./component"); exports.SERVICE_TAG = 'Service'; exports.Service = function (...idOrOption) { return (t) => { const option = (0, component_1.parseComponentOption)(t, idOrOption); applyServiceDecorator(option, t); }; }; function applyServiceDecorator(option, target) { var _a; option.sysTags = ((_a = option.sysTags) === null || _a === void 0 ? void 0 : _a.indexOf(exports.SERVICE_TAG)) ? option.sysTags : [exports.SERVICE_TAG, ...(option.sysTags || [])]; return (0, component_1.applyComponentDecorator)(option, target); } exports.applyServiceDecorator = applyServiceDecorator; //# sourceMappingURL=service.js.map