File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { ReadableStream , WritableStream } from 'stream/web'
2
+ import { expectType } from 'tsd'
3
+ import { WebSocketStream } from '../../types'
4
+
5
+ declare const webSocketStream : WebSocketStream
6
+ const webSocketStreamOpened = await webSocketStream . opened
7
+
8
+ // Test that the readable and writable streams are of identical types to ones from stream/web
9
+ expectType < WritableStream > ( webSocketStreamOpened . writable )
10
+ expectType < ReadableStream > ( webSocketStreamOpened . readable )
Original file line number Diff line number Diff line change 1
1
/// <reference types="node" />
2
2
3
3
import type { Blob } from 'buffer'
4
+ import type { ReadableStream , WritableStream } from 'stream/web'
4
5
import type { MessagePort } from 'worker_threads'
5
6
import {
6
7
EventInit ,
You can’t perform that action at this time.
0 commit comments