Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/js/streams/mod.ts>ReadableStream

A modern runtime for JavaScript and TypeScript.
Go to Latest
class ReadableStream
implements [rs.SDReadableStream]<OutputType>
import { ReadableStream } from "https://deno.land/x/deno@v0.30.0/cli/js/streams/mod.ts";

Constructors

new
ReadableStream(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number; size?: undefined; })
new
ReadableStream(underlyingSource?: UnderlyingSource<OutputType>, strategy?: QueuingStrategy<OutputType>)
new
ReadableStream(underlyingSource?: UnderlyingSource<OutputType> | UnderlyingByteSource, strategy?: QueuingStrategy<OutputType> | { highWaterMark?: number; size?: undefined; })

Type Parameters

OutputType

Properties

readonly
locked: boolean
[rs.readableStreamController_]: rs.SDReadableStreamControllerBase<OutputType>
[rs.reader_]: rs.SDReadableStreamReader<OutputType> | undefined
[shared.state_]: rs.ReadableStreamState
[shared.storedError_]: shared.ErrorResult

Methods

cancel(reason: shared.ErrorResult): Promise<void>
getReader(): rs.SDReadableStreamDefaultReader<OutputType>
getReader(options: { mode?: "byob"; }): rs.SDReadableStreamBYOBReader
tee(): Array<SDReadableStream<OutputType>>