Skip to content

Commit 6b5d7a8

Browse files
committed
fix(types): fix type regression
1 parent aaa15a9 commit 6b5d7a8

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@
9090
"is-plain-obj": "^3.0.0",
9191
"micromatch": "^4.0.2"
9292
},
93+
"peerDependencies": {
94+
"@types/express": "^4.17.13"
95+
},
9396
"engines": {
9497
"node": ">=12.0.0"
9598
},

src/types.ts

+8-12
Original file line numberDiff line numberDiff line change
@@ -58,32 +58,28 @@ export type LogProviderCallback = (provider: LogProvider) => LogProvider;
5858
*/
5959
export type OnErrorCallback = (
6060
err: Error,
61-
req: http.IncomingMessage,
62-
res: http.ServerResponse,
61+
req: Request,
62+
res: Response,
6363
target?: string | Partial<url.Url>
6464
) => void;
6565
export type OnProxyResCallback = (
6666
proxyRes: http.IncomingMessage,
67-
req: http.IncomingMessage,
68-
res: http.ServerResponse
67+
req: Request,
68+
res: Response
6969
) => void;
7070
export type OnProxyReqCallback = (
7171
proxyReq: http.ClientRequest,
72-
req: http.IncomingMessage,
73-
res: http.ServerResponse,
72+
req: Request,
73+
res: Response,
7474
options: httpProxy.ServerOptions
7575
) => void;
7676
export type OnProxyReqWsCallback = (
7777
proxyReq: http.ClientRequest,
78-
req: http.IncomingMessage,
78+
req: Request,
7979
socket: net.Socket,
8080
options: httpProxy.ServerOptions,
8181
head: any
8282
) => void;
83-
export type OnCloseCallback = (
84-
proxyRes: http.IncomingMessage,
85-
proxySocket: net.Socket,
86-
proxyHead: any
87-
) => void;
83+
export type OnCloseCallback = (proxyRes: Response, proxySocket: net.Socket, proxyHead: any) => void;
8884

8985
export type OnOpenCallback = (proxySocket: net.Socket) => void;

0 commit comments

Comments
 (0)