@nestjs/core
Version:
The core of NestJS, a TypeScript framework for Node.js backends: modules, dependency injection and the request pipeline, on Express, Fastify or node:http.
22 lines (21 loc) • 1.11 kB
TypeScript
import { RouteInfoPathExtractor } from './route-info-path-extractor.js';
import { RoutesMapper } from './routes-mapper.js';
import type { HttpServer, MiddlewareConsumer, Type } from '@nestjs/common';
import { type MiddlewareConfigProxy, type MiddlewareConfiguration, type RouteInfo } from '@nestjs/common/internal';
export declare class MiddlewareBuilder implements MiddlewareConsumer {
private readonly routesMapper;
private readonly httpAdapter;
private readonly routeInfoPathExtractor;
private readonly middlewareCollection;
private servedRoutes?;
constructor(routesMapper: RoutesMapper, httpAdapter: HttpServer, routeInfoPathExtractor: RouteInfoPathExtractor);
apply(...middleware: Array<Type<any> | Function | Array<Type<any> | Function>>): MiddlewareConfigProxy;
build(): MiddlewareConfiguration[];
getHttpAdapter(): HttpServer;
/**
* Returns the routes of the controllers of the application at the paths
* the router serves them at (global prefix and version included).
*/
getServedRoutes(): RouteInfo[];
private static readonly ConfigProxy;
}