From 6631655b4617bd4f9954347b0e99b3ba77534cf1 Mon Sep 17 00:00:00 2001 From: tsctx <91457664+tsctx@users.noreply.github.com> Date: Sun, 19 Nov 2023 16:09:14 +0900 Subject: [PATCH] fix: `onHeaders` type declaration (#2444) --- 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 816db19d20d..efc53eea791 100644 --- a/types/dispatcher.d.ts +++ b/types/dispatcher.d.ts @@ -211,7 +211,7 @@ declare namespace Dispatcher { /** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */ onUpgrade?(statusCode: number, headers: Buffer[] | string[] | null, socket: Duplex): void; /** Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. */ - onHeaders?(statusCode: number, headers: Buffer[] | string[] | null, resume: () => void): boolean; + onHeaders?(statusCode: number, headers: Buffer[] | string[] | null, resume: () => void, statusText: string): boolean; /** Invoked when response payload data is received. */ onData?(chunk: Buffer): boolean; /** Invoked when response payload and trailers have been received and the request has completed. */