UNPKG

@elsikora/nestjs-crud-automator

Version:

A library for automating the creation of CRUD operations in NestJS.

21 lines (18 loc) 954 B
import { MANUAL_PROPERTY_METADATA_DTO_UTILITY_CONSTANT } from '../../../../constant/utility/dto/manual-property-metadata.constant.js'; /** * Stores replayable decorator metadata for manual DTO properties so nested DTO wrappers can be * materialized per auto-generated parent context. * @param {object} target - Decorated DTO prototype. * @param {string | symbol} propertyKey - Decorated property key. * @param {TManualDtoPropertyMetadata} metadata - Replayable decorator metadata. */ function RegisterManualDtoPropertyMetadata(target, propertyKey, metadata) { if (!target) { return; } const registry = new Map(Reflect.getMetadata?.(MANUAL_PROPERTY_METADATA_DTO_UTILITY_CONSTANT.KEY, target)); registry.set(propertyKey, metadata); Reflect.defineMetadata?.(MANUAL_PROPERTY_METADATA_DTO_UTILITY_CONSTANT.KEY, registry, target); } export { RegisterManualDtoPropertyMetadata }; //# sourceMappingURL=register.utility.js.map