File tree Expand file tree Collapse file tree 4 files changed +18
-6
lines changed Expand file tree Collapse file tree 4 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -2031,15 +2031,15 @@ declare module "http" {
20312031 * A browser-compatible implementation of [WebSocket](https://nodejs.org/docs/latest/api/http.html#websocket).
20322032 * @since v22.5.0
20332033 */
2034- const WebSocket : import ( "undici-types" ) . WebSocket ;
2034+ const WebSocket : typeof import ( "undici-types" ) . WebSocket ;
20352035 /**
20362036 * @since v22.5.0
20372037 */
2038- const CloseEvent : import ( "undici-types" ) . CloseEvent ;
2038+ const CloseEvent : typeof import ( "undici-types" ) . CloseEvent ;
20392039 /**
20402040 * @since v22.5.0
20412041 */
2042- const MessageEvent : import ( "undici-types" ) . MessageEvent ;
2042+ const MessageEvent : typeof import ( "undici-types" ) . MessageEvent ;
20432043}
20442044declare module "node:http" {
20452045 export * from "http" ;
Original file line number Diff line number Diff line change @@ -730,3 +730,9 @@ import * as url from "node:url";
730730
731731 http . setMaxIdleHTTPParsers ( 1337 ) ;
732732}
733+
734+ {
735+ new http . WebSocket ( "ws://example.com" , [ "protocol" ] ) ;
736+ new http . CloseEvent ( "close" ) ;
737+ new http . MessageEvent ( "message" , { data : "data" } ) ;
738+ }
Original file line number Diff line number Diff line change @@ -2031,15 +2031,15 @@ declare module "http" {
20312031 * A browser-compatible implementation of `WebSocket`.
20322032 * @since v22.5.0
20332033 */
2034- const WebSocket : import ( "undici-types" ) . WebSocket ;
2034+ const WebSocket : typeof import ( "undici-types" ) . WebSocket ;
20352035 /**
20362036 * @since v22.5.0
20372037 */
2038- const CloseEvent : import ( "undici-types" ) . CloseEvent ;
2038+ const CloseEvent : typeof import ( "undici-types" ) . CloseEvent ;
20392039 /**
20402040 * @since v22.5.0
20412041 */
2042- const MessageEvent : import ( "undici-types" ) . MessageEvent ;
2042+ const MessageEvent : typeof import ( "undici-types" ) . MessageEvent ;
20432043}
20442044declare module "node:http" {
20452045 export * from "http" ;
Original file line number Diff line number Diff line change @@ -730,3 +730,9 @@ import * as url from "node:url";
730730
731731 http . setMaxIdleHTTPParsers ( 1337 ) ;
732732}
733+
734+ {
735+ new http . WebSocket ( "ws://example.com" , [ "protocol" ] ) ;
736+ new http . CloseEvent ( "close" ) ;
737+ new http . MessageEvent ( "message" , { data : "data" } ) ;
738+ }
You can’t perform that action at this time.
0 commit comments