@nova-ts/core
Version:
A serverside framework used to build scalable application
29 lines (27 loc) • 1.17 kB
TypeScript
/**
* Responsible for resolving controller method parameters at runtime based on
* metadata set by parameter decorators (e.g., @RequestParam, @Body, @RequestHeader).
*
* This class reads the metadata registered via `createParameterDecorator()` and,
* during an incoming request, extracts the correct values from the `Request` object
* and injects them into the controller method call.
* controllerInstance.methodName(...args);
*
* @author Inbanithi107
*/
declare class NovaControllerResolver {
args: any[];
setArgs(args: any[]): void;
/**
* Resolves the method parameters by extracting metadata and values from the request.
*
* @param controllerClass - The controller class (or its prototype).
* @param route - The name of the method to resolve parameters for.
* @param request - The current Nova request object.
* @param response - The current Nova response object.
* @param next - The current Express next object.
* @returns The resolved list of arguments to pass to the method.
*/
resolveArgument(instance: any, route: any, Request: any, Response: any, next: any): any[];
}
export { NovaControllerResolver };