diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2022-08-17 13:12:24 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-17 13:12:24 +1000 |
commit | a2ab5eee015b1dafc1a18cd2bc5f5c5756123d74 (patch) | |
tree | 1efd7d79208fee44cc05c71c18c7d9e6759ed8c3 /ext/websocket | |
parent | 868c7e38bfc9a09b5cfeae30ea5a2345a6d700d7 (diff) |
docs: add category tag for built-in APIs (#15480)
Diffstat (limited to 'ext/websocket')
-rw-r--r-- | ext/websocket/lib.deno_websocket.d.ts | 12 |
1 files changed, 10 insertions, 2 deletions
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 @@ /// <reference no-default-lib="true" /> /// <reference lib="esnext" /> +/** @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"; |