UNPKG

@elsikora/nestjs-crud-automator

Version:

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

19 lines (18 loc) 1.05 kB
/** * Executes and clears all queued handlers that were waiting for the DTO context on the specified prototype. * @param {object} target - DTO prototype whose queued handlers should run. */ export declare function FlushAutoDtoContextExecutions(target: object): void; /** * Queues a handler to run once the DTO context becomes available for the specified prototype. * @param {object} target - DTO prototype awaiting context. * @param {() => void} handler - Callback to execute after context is defined. */ export declare function QueueAutoDtoContextExecution(target: object, handler: () => void): void; /** * Registers a listener that should be notified whenever DTO auto-context becomes available * for the provided prototype. Return true to stay subscribed, false to unsubscribe. * @param {object} target - DTO prototype awaiting context notifications. * @param {() => boolean} listener - Callback executed on each context propagation. */ export declare function RegisterAutoDtoContextListener(target: object, listener: () => boolean): void;