UNPKG

891 BTypeScriptView Raw
1import { HttpServer, RouteInfo, Type } from '@nestjs/common/interfaces';
2import { ExcludeRouteMetadata } from '../router/interfaces/exclude-route-metadata.interface';
3export declare const mapToExcludeRoute: (routes: RouteInfo[]) => ExcludeRouteMetadata[];
4export declare const filterMiddleware: <T extends Function | Type<any> = any>(middleware: T[], routes: RouteInfo[], httpAdapter: HttpServer) => Type<any>[];
5export declare const mapToClass: <T extends Function | Type<any>>(middleware: T, excludedRoutes: ExcludeRouteMetadata[], httpAdapter: HttpServer) => Type<any>;
6export declare function isMiddlewareClass(middleware: any): middleware is Type<any>;
7export declare function assignToken(metatype: Type<any>, token?: any): Type<any>;
8export declare function isMiddlewareRouteExcluded(req: Record<string, any>, excludedRoutes: ExcludeRouteMetadata[], httpAdapter: HttpServer): boolean;