Skip to content

Commit

Permalink
fix(types): fix type regression
Browse files Browse the repository at this point in the history
  • Loading branch information
chimurai committed Jan 23, 2022
1 parent aaa15a9 commit 42cbc87
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@
"is-plain-obj": "^3.0.0",
"micromatch": "^4.0.2"
},
"peerDependencies": {
"@types/express": "^4.17.13"
},
"engines": {
"node": ">=12.0.0"
},
Expand Down
20 changes: 8 additions & 12 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,32 +58,28 @@ export type LogProviderCallback = (provider: LogProvider) => LogProvider;
*/
export type OnErrorCallback = (
err: Error,
req: http.IncomingMessage,
res: http.ServerResponse,
req: Request,
res: Response,
target?: string | Partial<url.Url>
) => void;
export type OnProxyResCallback = (
proxyRes: http.IncomingMessage,
req: http.IncomingMessage,
res: http.ServerResponse
req: Request,
res: Response
) => void;
export type OnProxyReqCallback = (
proxyReq: http.ClientRequest,
req: http.IncomingMessage,
res: http.ServerResponse,
req: Request,
res: Response,
options: httpProxy.ServerOptions
) => void;
export type OnProxyReqWsCallback = (
proxyReq: http.ClientRequest,
req: http.IncomingMessage,
req: Request,
socket: net.Socket,
options: httpProxy.ServerOptions,
head: any
) => void;
export type OnCloseCallback = (
proxyRes: http.IncomingMessage,
proxySocket: net.Socket,
proxyHead: any
) => void;
export type OnCloseCallback = (proxyRes: Response, proxySocket: net.Socket, proxyHead: any) => void;

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

0 comments on commit 42cbc87

Please sign in to comment.