@nestjs/core
Version:
Nest - modern, fast, powerful node.js web framework (@core)
21 lines (20 loc) • 1.01 kB
TypeScript
import { HttpServer, RequestMethod } from '@nestjs/common';
export interface CustomHeader {
name: string;
value: string;
}
export interface RedirectResponse {
url: string;
statusCode: number;
}
export declare class RouterResponseController {
private readonly applicationRef;
constructor(applicationRef: HttpServer);
apply<TInput = any, TResponse = any>(result: TInput, response: TResponse, httpStatusCode?: number): Promise<any>;
redirect<TInput = any, TResponse = any>(resultOrDeferred: TInput, response: TResponse, redirectResponse: RedirectResponse): Promise<void>;
render<TInput = any, TResponse = any>(resultOrDeferred: TInput, response: TResponse, template: string): Promise<void>;
transformToResult(resultOrDeferred: any): Promise<any>;
getStatusByMethod(requestMethod: RequestMethod): number;
setHeaders<TResponse = any>(response: TResponse, headers: CustomHeader[]): void;
setStatus<TResponse = any>(response: TResponse, statusCode: number): void;
}