Skip to content

Commit

Permalink
use correct types for webSocket (#2738)
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig authored Sep 19, 2024
1 parent b6a8de7 commit 9f3b833
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/workerd/api/http.h
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,7 @@ class Response final: public Body {
JSG_STRUCT_TS_OVERRIDE(ResponseInit {
headers?: HeadersInit;
encodeBody?: "automatic" | "manual";
webSocket?: WebSocket;
});
};

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 9f3b833

Please sign in to comment.