From 5e845442fade02cd12d13e74222b26e217c5971d Mon Sep 17 00:00:00 2001 From: Surma Date: Sun, 13 Feb 2022 13:47:46 +0000 Subject: [PATCH] docs(websockets): add comment about Deno.upgradeWebSocket() for WebSocket servers (#13659) --- ext/websocket/lib.deno_websocket.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/websocket/lib.deno_websocket.d.ts b/ext/websocket/lib.deno_websocket.d.ts index 81dcaffc02..af9026d419 100644 --- a/ext/websocket/lib.deno_websocket.d.ts +++ b/ext/websocket/lib.deno_websocket.d.ts @@ -34,7 +34,11 @@ interface WebSocketEventMap { open: Event; } -/** Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection. */ +/** + * Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection. + * + * If you are looking to create a WebSocket server, please take a look at Deno.upgradeWebSocket(). + */ declare class WebSocket extends EventTarget { constructor(url: string, protocols?: string | string[]);