new WritableStream([underlyingSink[, strategy]])
-
underlyingSink<Object>-
start<Function> 创建WritableStream时立即调用的用户定义函数。¥
start<Function> A user-defined function that is invoked immediately when theWritableStreamis created.-
controller<WritableStreamDefaultController> -
返回:
undefined或用undefined实现的 promise。¥Returns:
undefinedor a promise fulfilled withundefined.
-
-
write<Function> 将数据块写入WritableStream时调用的用户定义函数。¥
write<Function> A user-defined function that is invoked when a chunk of data has been written to theWritableStream.-
chunk<any> -
controller<WritableStreamDefaultController> -
返回:
undefined兑现的 promise。¥Returns: A promise fulfilled with
undefined.
-
-
close<Function>WritableStream关闭时调用的用户定义函数。¥
close<Function> A user-defined function that is called when theWritableStreamis closed.-
返回:
undefined兑现的 promise。¥Returns: A promise fulfilled with
undefined.
-
-
abort<Function> 调用以突然关闭WritableStream的用户定义函数。¥
abort<Function> A user-defined function that is called to abruptly close theWritableStream.-
reason<any> -
返回:
undefined兑现的 promise。¥Returns: A promise fulfilled with
undefined.
-
-
type<any>type选项保留供将来使用,必须未定义。¥
type<any> Thetypeoption is reserved for future use and must be undefined.
-
-
strategy<Object>-
highWaterMark<number> 应用背压之前的最大内部队列大小。¥
highWaterMark<number> The maximum internal queue size before backpressure is applied. -
size<Function> 一个用户定义的函数,用于标识每个数据块的大小。¥
size<Function> A user-defined function used to identify the size of each chunk of data.
-