summaryrefslogtreecommitdiff
path: root/cli/dts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/dts')
-rw-r--r--cli/dts/lib.deno.unstable.d.ts25
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;
+}