UNPKG

@toss/nestjs-aop

Version:

<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/toss/nestjs-aop"> <img src="https://toss.tech/wp-content/uploads/2022/11/tech-article-nest-js-02.png" alt="Logo" height="200"> </a>

18 lines 718 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AddMetadata = void 0; const AddMetadata = (metadataKey, metadataValue) => { const decoratorFactory = (_, __, descriptor) => { const target = descriptor.value || descriptor.get || descriptor.set; if (!Reflect.hasMetadata(metadataKey, target)) { Reflect.defineMetadata(metadataKey, [], target); } const metadataValues = Reflect.getMetadata(metadataKey, target); metadataValues.push(metadataValue); return descriptor; }; decoratorFactory.KEY = metadataKey; return decoratorFactory; }; exports.AddMetadata = AddMetadata; //# sourceMappingURL=add-metadata.js.map