# Interface ReadableStream<R>

This Streams API interface represents a readable stream of byte data.

#### Type Parameters

- #### R = any

#### Hierarchy

- ReadableStream

#####
Index

### Properties

locked

### Methods

[asyncIterator]
cancel
getReader
pipeThrough
pipeTo
tee
values

## Properties

### `Readonly` locked

locked: boolean

## Methods

### [asyncIterator]

- [asyncIterator](): AsyncIterableIterator<R, any, any>

- #### Returns AsyncIterableIterator<R, any, any>

### cancel

- cancel(reason?): Promise<void>

- #### Parameters

  - ##### `Optional` reason: any

  #### Returns Promise<void>

### getReader

- getReader(): ReadableStreamDefaultReader<R>

- #### Returns ReadableStreamDefaultReader<R>

- getReader(options): ReadableStreamBYOBReader

- #### Parameters

  - ##### options: {
    mode: "byob";
    }

    - ##### mode: "byob"

  #### Returns ReadableStreamBYOBReader

### pipeThrough

- pipeThrough<T>(transform, options?): ReadableStream<T>

- #### Type Parameters

  - #### T

  #### Parameters

  - ##### transform: ReadableWritablePair<T, R>

  - ##### `Optional` options: StreamPipeOptions

  #### Returns ReadableStream<T>

### pipeTo

- pipeTo(destination, options?): Promise<void>

- #### Parameters

  - ##### destination: WritableStream<R>

  - ##### `Optional` options: StreamPipeOptions

  #### Returns Promise<void>

### tee

- tee(): [ReadableStream<R>, ReadableStream<R>]

- #### Returns [ReadableStream<R>, ReadableStream<R>]

### values

- values(options?): AsyncIterableIterator<R, any, any>

- #### Parameters

  - ##### `Optional` options: {
    preventCancel?: boolean;
    }

    - ##### `Optional` preventCancel?: boolean

  #### Returns AsyncIterableIterator<R, any, any>

Generated using TypeDoc