vue-facing-decorator
Version:
Vue typescript class and decorator based component.
22 lines • 754 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.createDecorator = void 0;
const utils_1 = require("../utils");
const utils_2 = require("../deco3/utils");
function createDecorator(creator, opt) {
return (0, utils_2.compatibleMemberDecorator)(function (proto, key) {
const slot = (0, utils_1.obtainSlot)(proto);
const map = slot.obtainMap('customDecorator');
if (!map.has(key)) {
map.set(key, []);
}
const arr = map.get(key);
arr.push({
key,
creator,
preserve: !!(opt === null || opt === void 0 ? void 0 : opt.preserve)
});
});
}
exports.createDecorator = createDecorator;
//# sourceMappingURL=custom.js.map
;