diff --git a/express-serve-static-core/index.d.ts b/express-serve-static-core/index.d.ts index 932b8075b1..42f1a535f7 100644 --- a/express-serve-static-core/index.d.ts +++ b/express-serve-static-core/index.d.ts @@ -856,6 +856,10 @@ interface RequestParamHandler { (req: Request, res: Response, next: NextFunction, value: any, name: string): any; } +type ApplicaitonRequestHandler = IRouterHandler & IRouterMatcher & { + (...handlers: RequestHandlerParams[]): T; +}; + interface Application extends IRouter, Express.Application { /** * Express instance itself is a request handler, which could be invoked without @@ -1096,10 +1100,12 @@ interface Application extends IRouter, Express.Application { * Used to get all registered routes in Express Application */ _router: any; + + use: ApplicaitonRequestHandler; } interface Express extends Application { request: Request; response: Response; -} \ No newline at end of file +}