From a2ab5eee015b1dafc1a18cd2bc5f5c5756123d74 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Wed, 17 Aug 2022 13:12:24 +1000 Subject: docs: add category tag for built-in APIs (#15480) --- ext/websocket/lib.deno_websocket.d.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ext/websocket/lib.deno_websocket.d.ts') diff --git a/ext/websocket/lib.deno_websocket.d.ts b/ext/websocket/lib.deno_websocket.d.ts index 70d0bd61d..537eabf21 100644 --- a/ext/websocket/lib.deno_websocket.d.ts +++ b/ext/websocket/lib.deno_websocket.d.ts @@ -5,12 +5,14 @@ /// /// +/** @category Web Sockets */ interface CloseEventInit extends EventInit { code?: number; reason?: string; wasClean?: boolean; } +/** @category Web Sockets */ declare class CloseEvent extends Event { constructor(type: string, eventInitDict?: CloseEventInit); /** @@ -27,6 +29,7 @@ declare class CloseEvent extends Event { readonly wasClean: boolean; } +/** @category Web Sockets */ interface WebSocketEventMap { close: CloseEvent; error: Event; @@ -35,9 +38,13 @@ interface WebSocketEventMap { } /** - * 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()`. + * If you are looking to create a WebSocket server, please take a look at + * `Deno.upgradeWebSocket()`. + * + * @category Web Sockets */ declare class WebSocket extends EventTarget { constructor(url: string | URL, protocols?: string | string[]); @@ -113,4 +120,5 @@ declare class WebSocket extends EventTarget { ): void; } +/** @category Web Sockets */ type BinaryType = "arraybuffer" | "blob"; -- cgit v1.2.3