From a2939bc495b9051877b36e6c026a0d5903b971f9 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Sun, 14 Apr 2024 14:03:03 +0200 Subject: [PATCH] fix: onConnect types (#3116) --- types/dispatcher.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/dispatcher.d.ts b/types/dispatcher.d.ts index 21f9b456aa8..c472c8bec05 100644 --- a/types/dispatcher.d.ts +++ b/types/dispatcher.d.ts @@ -217,7 +217,7 @@ declare namespace Dispatcher { export type StreamFactory = (data: StreamFactoryData) => Writable; export interface DispatchHandlers { /** Invoked before request is dispatched on socket. May be invoked multiple times when a request is retried when the request at the head of the pipeline fails. */ - onConnect?(abort: () => void): void; + onConnect?(abort: (err?: Error) => void): void; /** Invoked when an error has occurred. */ onError?(err: Error): void; /** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */