summaryrefslogtreecommitdiff
path: root/cli/tsc/dts/lib.deno.unstable.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tsc/dts/lib.deno.unstable.d.ts')
-rw-r--r--cli/tsc/dts/lib.deno.unstable.d.ts13
1 files changed, 11 insertions, 2 deletions
diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts
index 8f11adfff..bc770dab8 100644
--- a/cli/tsc/dts/lib.deno.unstable.d.ts
+++ b/cli/tsc/dts/lib.deno.unstable.d.ts
@@ -2268,10 +2268,19 @@ declare interface WebSocketCloseInfo {
* @tags allow-net
* @category Web Sockets
*/
-declare class WebSocketStream {
- constructor(url: string, options?: WebSocketStreamOptions);
+declare interface WebSocketStream {
url: string;
connection: Promise<WebSocketConnection>;
closed: Promise<WebSocketCloseInfo>;
close(closeInfo?: WebSocketCloseInfo): void;
}
+
+/** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @tags allow-net
+ * @category Web Sockets
+ */
+declare var WebSocketStream: {
+ readonly prototype: WebSocketStream;
+ new (url: string, options?: WebSocketStreamOptions): WebSocketStream;
+};