TransformStream.readable

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since June 2022.

TransformStream 接口的只读属性 readable 返回由这个 TransformStream 控制的 ReadableStream 实例。

一个 ReadableStream

示例

以下示例创建了一个新的 TransformStream 并将其赋值给 textEncoderStream,然后将 readable 的值打印到控制台上。

js
const textEncoderStream = new TransformStream();
console.log(textEncoderStream.readable); // a ReadableStream

规范

Specification
Streams
# ref-for-ts-readable②

浏览器兼容性

BCD tables only load in the browser