forked from rescript-lang/experimental-rescript-webapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWritableStream.res
More file actions
28 lines (24 loc) · 772 Bytes
/
WritableStream.res
File metadata and controls
28 lines (24 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
open FileAPI
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream)
*/
@new
external make: (
~underlyingSink: underlyingSink<'w>=?,
~strategy: queuingStrategy<'w>=?,
) => writableStream<'w> = "WritableStream"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream/abort)
*/
@send
external abort: (writableStream<'w>, ~reason: JSON.t=?) => promise<unit> = "abort"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream/close)
*/
@send
external close: writableStream<'w> => promise<unit> = "close"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter)
*/
@send
external getWriter: writableStream<'w> => writableStreamDefaultWriter<'w> = "getWriter"