@elsikora/nestjs-crud-automator
Version:
A library for automating the creation of CRUD operations in NestJS.
12 lines (11 loc) • 713 B
TypeScript
import { IApiBaseEntity } from '../../../../interface/api-base-entity.interface';
import { IApiRouteMetadata } from '../../../../interface/decorator/api';
/**
* Serializes a route response using the route metadata response DTO configuration.
* @template E - Entity type represented by the route metadata.
* @template R - Response value type.
* @param {Pick<IApiRouteMetadata<E>, "response">} metadata - Route metadata containing response serialization settings.
* @param {R} response - Response value to serialize.
* @returns {R} Serialized response value.
*/
export declare function ApiRouteSerializeResponse<E extends IApiBaseEntity, R>(metadata: Pick<IApiRouteMetadata<E>, "response">, response: R): R;