Skip to main content

Streams

Manage data streams, queuing strategies, and transformations. Handle data in chunks, process large datasets, and optimize memory usage.

Eg ReadableStream, WritableStream, TransformStream

Interfaces

I
v
CompressionStream

An API for compressing a stream of data.

I
v
CountQueuingStrategy

This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.

I
v
DecompressionStream

An API for decompressing a stream of data.

I
GenericTransformStream
No documentation available
I
QueuingStrategy
No documentation available
I
QueuingStrategyInit
No documentation available
I
QueuingStrategySize
No documentation available
    I
    v
    ReadableStream

    This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.

    I
    ReadableStreamBYOBReaderReadOptions
    No documentation available
    I
    ReadableStreamGenericReader
    No documentation available
    I
    ReadableStreamGetReaderOptions
    No documentation available
    I
    ReadableStreamReadDoneResult
    No documentation available
    I
    ReadableStreamReadValueResult
    No documentation available
    I
    ReadableWritablePair
    No documentation available
    I
    TransformerCancelCallback
    No documentation available
      I
      TransformerFlushCallback
      No documentation available
        I
        TransformerStartCallback
        No documentation available
          I
          TransformerTransformCallback
          No documentation available
            I
            v
            I
            UnderlyingSink
            No documentation available
            I
            UnderlyingSinkAbortCallback
            No documentation available
              I
              UnderlyingSinkCloseCallback
              No documentation available
                I
                UnderlyingSinkStartCallback
                No documentation available
                  I
                  UnderlyingSinkWriteCallback
                  No documentation available
                    I
                    UnderlyingSourceCancelCallback
                    No documentation available
                      I
                      UnderlyingSourcePullCallback
                      No documentation available
                        I
                        UnderlyingSourceStartCallback
                        No documentation available
                          I
                          v
                          WritableStream

                          This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing.

                          I
                          v
                          WritableStreamDefaultController

                          This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate.

                          I
                          v
                          WritableStreamDefaultWriter

                          This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink.

                          Type Aliases

                          T
                          CompressionFormat
                          No documentation available
                            T
                            ReadableStreamController
                            No documentation available
                              T
                              ReadableStreamReader
                              No documentation available
                                T
                                ReadableStreamReaderMode
                                No documentation available
                                  T
                                  ReadableStreamReadResult
                                  No documentation available
                                    T
                                    ReadableStreamType
                                    No documentation available


                                      interface CompressionStream

                                      An API for compressing a stream of data.

                                      Examples #

                                      #
                                      await Deno.stdin.readable
                                        .pipeThrough(new CompressionStream("gzip"))
                                        .pipeTo(Deno.stdout.writable);
                                      

                                      Properties #

                                      variable CompressionStream

                                      An API for compressing a stream of data.

                                      Examples #

                                      #
                                      await Deno.stdin.readable
                                        .pipeThrough(new CompressionStream("gzip"))
                                        .pipeTo(Deno.stdout.writable);
                                      

                                      Properties #



                                      interface DecompressionStream

                                      An API for decompressing a stream of data.

                                      Examples #

                                      #
                                      const input = await Deno.open("./file.txt.gz");
                                      const output = await Deno.create("./file.txt");
                                      
                                      await input.readable
                                        .pipeThrough(new DecompressionStream("gzip"))
                                        .pipeTo(output.writable);
                                      

                                      Properties #

                                      variable DecompressionStream

                                      An API for decompressing a stream of data.

                                      Examples #

                                      #
                                      const input = await Deno.open("./file.txt.gz");
                                      const output = await Deno.create("./file.txt");
                                      
                                      await input.readable
                                        .pipeThrough(new DecompressionStream("gzip"))
                                        .pipeTo(output.writable);
                                      

                                      Properties #






                                      interface ReadableByteStreamController

                                      Properties #

                                      #desiredSize: number | null
                                      readonly

                                      Methods #

                                      #close(): void
                                      #enqueue(chunk: ArrayBufferView): void
                                      #error(e?: any): void

                                      variable ReadableByteStreamController

                                      The constructor object for ReadableByteStreamController.

                                      Instances are passed to a byte-oriented ReadableStream's underlying source callbacks rather than constructed directly, so calling the constructor throws.

                                      Properties #


                                      interface ReadableStream

                                      This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.

                                      Type Parameters #

                                      #R = any

                                      Properties #

                                      #locked: boolean
                                      readonly

                                      Methods #

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

                                      variable ReadableStream

                                      The constructor object for ReadableStream, used to create a readable stream from an underlying source describing how data is enqueued and consumed.

                                      Properties #

                                      Methods #

                                      #from<R>(asyncIterable: AsyncIterable<R> | Iterable<R | PromiseLike<R>> & object): ReadableStream<R>

                                      interface ReadableStreamBYOBReader

                                      Methods #

                                      #read<T extends ArrayBufferView>(): Promise<ReadableStreamReadResult<T>>
                                      #releaseLock(): void

                                      variable ReadableStreamBYOBReader

                                      The constructor object for ReadableStreamBYOBReader, used to create a "bring your own buffer" reader locked to the given byte stream. Most code obtains one via ReadableStream.getReader({ mode: "byob" }) instead.

                                      Properties #































                                      interface WritableStream

                                      This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing.

                                      Type Parameters #

                                      #W = any

                                      Properties #

                                      #locked: boolean
                                      readonly

                                      Methods #

                                      #abort(reason?: any): Promise<void>
                                      #close(): Promise<void>

                                      variable WritableStream

                                      The constructor object for WritableStream, used to create a writable stream from an underlying sink describing how written chunks are handled.

                                      Properties #


                                      interface WritableStreamDefaultController

                                      This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate.

                                      Properties #

                                      Methods #

                                      #error(e?: any): void

                                      variable WritableStreamDefaultController

                                      The constructor object for WritableStreamDefaultController.

                                      Instances are passed to a WritableStream's underlying sink callbacks rather than constructed directly, so calling the constructor throws.

                                      Properties #


                                      interface WritableStreamDefaultWriter

                                      This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink.

                                      Type Parameters #

                                      #W = any

                                      Properties #

                                      #closed: Promise<void>
                                      readonly
                                      #desiredSize: number | null
                                      readonly
                                      #ready: Promise<void>
                                      readonly

                                      Methods #

                                      #abort(reason?: any): Promise<void>
                                      #close(): Promise<void>
                                      #releaseLock(): void
                                      #write(chunk?: W): Promise<void>

                                      variable WritableStreamDefaultWriter

                                      The constructor object for WritableStreamDefaultWriter, used to create a writer locked to the given WritableStream. Most code obtains one via WritableStream.getWriter instead.

                                      Properties #








                                      Did you find what you needed?

                                      Privacy policy