diff options
Diffstat (limited to 'cli/dts')
-rw-r--r-- | cli/dts/lib.deno.unstable.d.ts | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index ab4a63729..b83309bc9 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -1152,3 +1152,28 @@ declare interface WorkerOptions { }; }; } + +declare interface WebSocketStreamOptions { + protocols?: string[]; + signal?: AbortSignal; +} + +declare interface WebSocketConnection { + readable: ReadableStream<string | Uint8Array>; + writable: WritableStream<string | Uint8Array>; + extensions: string; + protocol: string; +} + +declare interface WebSocketCloseInfo { + code?: number; + reason?: string; +} + +declare class WebSocketStream { + constructor(url: string, options?: WebSocketStreamOptions); + url: string; + connection: Promise<WebSocketConnection>; + closed: Promise<WebSocketCloseInfo>; + close(closeInfo?: WebSocketCloseInfo): void; +} |