# Interface ReadableStream<R>

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

interface ReadableStream<R> {
locked: boolean;
[asyncIterator](): AsyncIterableIterator<R>;
cancel(reason?): Promise<void>;
getReader(): ReadableStreamDefaultReader<R>;
getReader(options): ReadableStreamBYOBReader;
pipeThrough<T>(transform, options?): ReadableStream<T>;
pipeTo(destination, options?): Promise<void>;
tee(): [ReadableStream<R>, ReadableStream<R>];
values(options?): AsyncIterableIterator<R>;
}

#### Type Parameters

- R = any

- Defined in node_modules/@types/node/stream/web.d.ts:146
- Defined in node_modules/@types/node/stream/web.d.ts:157

#####
Index

### Properties

locked

### Methods

[asyncIterator]
cancel
getReader
pipeThrough
pipeTo
tee
values

## Properties

### `Readonly` locked

locked: boolean

- Defined in node_modules/@types/node/stream/web.d.ts:147

## Methods

### [asyncIterator]

- [asyncIterator](): AsyncIterableIterator<R>

- #### Returns AsyncIterableIterator<R>

  - Defined in node_modules/@types/node/stream/web.d.ts:155

### cancel

- cancel(reason?): Promise<void>

- #### Parameters

  - `Optional` reason: any

  #### Returns Promise<void>

  - Defined in node_modules/@types/node/stream/web.d.ts:148

### getReader

- getReader(): ReadableStreamDefaultReader<R>

- #### Returns ReadableStreamDefaultReader<R>

  - Defined in node_modules/@types/node/stream/web.d.ts:149
- getReader(options): ReadableStreamBYOBReader

- #### Parameters

  - options: {
    mode: "byob";
    }

    - ##### mode: "byob"

  #### Returns ReadableStreamBYOBReader

  - Defined in node_modules/@types/node/stream/web.d.ts:150

### pipeThrough

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

- #### Type Parameters

  - T

  #### Parameters

  - transform: ReadableWritablePair<T, R>
  - `Optional` options: StreamPipeOptions

  #### Returns ReadableStream<T>

  - Defined in node_modules/@types/node/stream/web.d.ts:151

### pipeTo

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

- #### Parameters

  - destination: WritableStream<R>
  - `Optional` options: StreamPipeOptions

  #### Returns Promise<void>

  - Defined in node_modules/@types/node/stream/web.d.ts:152

### tee

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

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

  - Defined in node_modules/@types/node/stream/web.d.ts:153

### values

- values(options?): AsyncIterableIterator<R>

- #### Parameters

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

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

  #### Returns AsyncIterableIterator<R>

  - Defined in node_modules/@types/node/stream/web.d.ts:154