docs(websockets): add comment about Deno.upgradeWebSocket()

This commit is contained in:
Surma 2022-02-13 13:12:51 +00:00
parent 6de53b631f
commit 3f241024cf
No known key found for this signature in database
GPG Key ID: DF43AB400F58C405

View File

@ -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[]);