Skip to content

Commit 3201de3

Browse files
author
molty3000
committed
fix(types): use Node http.IncomingMessage/ServerResponse for onError params
restana.Request/Response are generic types requiring Protocol<P> — incompatible with the Hooks interface which is not parameterized. Node's native types are the correct base types (restana extends them) and require no type arguments.
1 parent 479975d commit 3201de3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ declare namespace fastgateway {
5959
onRequest?: Function
6060
rewriteHeaders?: Function
6161
onResponse?: Function
62-
onError?: (error: Error, request: Request, response: Response) => void
62+
onError?: (error: Error, req: import('http').IncomingMessage, res: import('http').ServerResponse) => void
6363
rewriteRequestHeaders?: Function
6464
request?: {
6565
timeout?: number

0 commit comments

Comments
 (0)