Fix #24495 missing req.res, req.next and res.req

This commit is contained in:
Satana Charuwichitratana
2018-06-03 19:46:45 +07:00
parent 374b6dd963
commit afeac2b7eb
+13
View File
@@ -455,6 +455,13 @@ export interface Request extends http.IncomingMessage, Express.Request {
baseUrl: string;
app: Application;
/**
* After middleware.init executed, Request will contain res and next properties
* See: express/lib/middleware/init.js
*/
res?: Response;
next?: NextFunction;
}
export interface MediaType {
@@ -833,6 +840,12 @@ export interface Response extends http.ServerResponse, Express.Response {
* @since 4.11.0
*/
append(field: string, value?: string[]|string): Response;
/**
* After middleware.init executed, Response will contain req property
* See: express/lib/middleware/init.js
*/
req?: Request;
}
export interface Handler extends RequestHandler { }