Skip to content

Commit fff60a0

Browse files
committed
docs: add jsdoc for onUpgrade
1 parent 20f539f commit fff60a0

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/core/ws.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,13 @@ const WEBSOCKET_GUID = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'
168168

169169
interface WebSocketNamespace {
170170
link: typeof createWebSocketLinkHandler
171+
/**
172+
* Request handler for the `upgrade` requests to the WebSocket protocol.
173+
* This requires a WebSocket handler to be present to fire.
174+
* @note This only affects Node.js as the `upgrade` request header is
175+
* forbidden and cannot be read in the browser. Consider using the
176+
* `WebSocket` API for establishing WebSocket connections in the browser.
177+
*/
171178
onUpgrade: (info: {
172179
requestId: string
173180
request: Request

0 commit comments

Comments
 (0)