From daa227436fb846b4e733cba0f04db70d9a4bbf16 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Wed, 18 Sep 2024 12:00:53 -0400 Subject: [PATCH] use correct types for webSocket --- src/workerd/api/http.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/workerd/api/http.h b/src/workerd/api/http.h index 9b642320914..b099fff0d15 100644 --- a/src/workerd/api/http.h +++ b/src/workerd/api/http.h @@ -1041,6 +1041,7 @@ class Response final: public Body { JSG_STRUCT_TS_OVERRIDE(ResponseInit { headers?: HeadersInit; encodeBody?: "automatic" | "manual"; + webSocket?: WebSocket; }); }; @@ -1161,7 +1162,7 @@ class Response final: public Body { // JSG_READONLY_INSTANCE_PROPERTY(type, getType); } - JSG_TS_OVERRIDE({ constructor(body?: BodyInit | null, init?: ResponseInit); }); + JSG_TS_OVERRIDE({ constructor(body?: BodyInit | null, init?: ResponseInit, webSocket?: WebSocket); }); // Use `BodyInit` and `ResponseInit` type aliases in constructor instead of inlining }