Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisjofrank committed Feb 5, 2025
1 parent d76b6f3 commit 5c862cc
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions ext/websocket/lib.deno_websocket.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,17 @@ interface WebSocket extends EventTarget {
* Returns the extensions selected by the server, if any.
*
* ```ts
* const ws = new WebSocket("ws://localhost:8080");
* console.log(ws.extensions); // ""
* // Server (running with permessage-deflate extension)
* const wss = new WebSocketServer({
* port: 8080,
* perMessageDeflate: true
* });
*
* // Client
* const ws = new WebSocket("ws://localhost:8080", {
* perMessageDeflate: true
* });
* console.log(ws.extensions); // "permessage-deflate"
* ```
*/
readonly extensions: string;
Expand Down

0 comments on commit 5c862cc

Please sign in to comment.