UNPKG

@elsikora/nestjs-crud-automator

Version:

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

17 lines (16 loc) 1.03 kB
import { IApiBaseEntity } from '../../interface/api-base-entity.interface'; import { Type } from '@nestjs/common'; import { TApiPropertyEntity } from '../../type/index'; /** * Resolves property decorator entity references immediately or throws if unavailable. * @param {TApiPropertyEntity} entity - Entity reference or resolver. * @param {string} decoratorName - Decorator name for error context. * @returns {IApiBaseEntity | Type<IApiBaseEntity>} Normalized entity reference. */ export declare function ResolvePropertyEntity(entity: TApiPropertyEntity, decoratorName: string): IApiBaseEntity | Type<IApiBaseEntity>; /** * Attempts to resolve the entity reference without throwing when the resolver returns undefined. * @param {TApiPropertyEntity} entity - Entity reference or factory. * @returns {IApiBaseEntity | Type<IApiBaseEntity> | undefined} Resolved entity or undefined when not ready. */ export declare function TryResolvePropertyEntity(entity: TApiPropertyEntity): IApiBaseEntity | Type<IApiBaseEntity> | undefined;