UNPKG

@elsikora/nestjs-crud-automator

Version:

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

20 lines (16 loc) 713 B
'use strict'; var autoContext_constant = require('../../constant/dto/auto-context.constant.js'); /** * Retrieves stored DTO auto-context (route method + dto type) for a generated DTO prototype. * @param {object} target - DTO prototype that may contain context metadata. * @returns {IDtoAutoContextMetadata | undefined} Stored context metadata if available. */ function GetAutoDtoContext(target) { const stack = Reflect.getMetadata?.(autoContext_constant.AUTO_CONTEXT_DTO_CONSTANT.METADATA_KEY, target); if (!stack || stack.length === 0) { return undefined; } return stack.at(-1); } exports.GetAutoDtoContext = GetAutoDtoContext; //# sourceMappingURL=auto-dto-context.utility.js.map