mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 11:41:44 +00:00
fix(express-serve-static-core): fix#10910 fixed application use argument does not match parameters (#13487)
This commit is contained in:
Vendored
+7
-1
@@ -856,6 +856,10 @@ interface RequestParamHandler {
|
||||
(req: Request, res: Response, next: NextFunction, value: any, name: string): any;
|
||||
}
|
||||
|
||||
type ApplicaitonRequestHandler<T> = IRouterHandler<T> & IRouterMatcher<T> & {
|
||||
(...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<this>;
|
||||
}
|
||||
|
||||
interface Express extends Application {
|
||||
request: Request;
|
||||
|
||||
response: Response;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user