Skip to main content
ReadableStream - node__stream--web.d.ts - Node documentation
interface ReadableStream

Usage in Deno

```typescript import { type ReadableStream } from "node:node__stream--web.d.ts"; ```
This Streams API interface represents a readable stream of byte data.

Type Parameters

R = any

Properties

readonly
locked: boolean

Methods

cancel(reason?: any): Promise<void>
getReader(options: { mode: "byob"; }): ReadableStreamBYOBReader
pipeTo(
destination: WritableStream<R>,
): Promise<void>
values(options?: { preventCancel?: boolean; }): AsyncIterableIterator<R>
[[Symbol.asyncIterator]](): AsyncIterableIterator<R>

Type Parameters

R = any
variable ReadableStream

Properties

Methods

from<T>(iterable: Iterable<T> | AsyncIterable<T>): ReadableStream<T>
`ReadableStream` class is a global reference for `import { ReadableStream } from 'node:stream/web'`. https://nodejs.org/api/globals.html#class-readablestream

Type

globalThis extends { onmessage: any; ReadableStream: infer T; } ? T : stream/web