Skip to main content

stream/web

Usage in Deno

import * as mod from "node:stream/web";

Interfaces

I
v
ByteLengthQueuingStrategy

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

I
v
I
v
CountQueuingStrategy

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

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

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

      I
      ReadableStreamAsyncIterator
      No documentation available
        I
        ReadableStreamErrorCallback
        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
          TextDecoderOptions
          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
                        UnderlyingSource
                        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 back pressure 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
                              BufferSource
                              No documentation available
                                T
                                ReadableStreamController
                                No documentation available
                                  T
                                  ReadableStreamReader
                                  No documentation available
                                    T
                                    ReadableStreamReaderMode
                                    No documentation available
                                      T
                                      ReadableStreamReadResult
                                      No documentation available

                                        interface ByteLengthQueuingStrategy

                                        extends QueuingStrategy<ArrayBufferView>

                                        Usage in Deno

                                        import { type ByteLengthQueuingStrategy } from "node:stream/web";
                                        

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

                                        Properties #

                                        #highWaterMark: number
                                        readonly
                                        #size: QueuingStrategySize<ArrayBufferView>
                                        readonly

                                        variable ByteLengthQueuingStrategy

                                        ByteLengthQueuingStrategy class is a global reference for import { ByteLengthQueuingStrategy } from 'node:stream/web'. https://nodejs.org/api/globals.html#class-bytelengthqueuingstrategy

                                        Type #

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

                                        interface CompressionStream

                                        Usage in Deno

                                        import { type CompressionStream } from "node:stream/web";
                                        

                                        Properties #

                                        variable CompressionStream

                                        CompressionStream class is a global reference for import { CompressionStream } from 'node:stream/web'. https://nodejs.org/api/globals.html#class-compressionstream

                                        Type #

                                        globalThis extends { onmessage: any; ReportingObserver: any; CompressionStream: infer T; } ? T : globalThis extends { onmessage: any; TransformStream: { prototype: infer T; }; } ? { prototype: T; } : stream/web

                                        interface CountQueuingStrategy

                                        Usage in Deno

                                        import { type CountQueuingStrategy } from "node:stream/web";
                                        

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

                                        Properties #

                                        #highWaterMark: number
                                        readonly

                                        variable CountQueuingStrategy

                                        CountQueuingStrategy class is a global reference for import { CountQueuingStrategy } from 'node:stream/web'. https://nodejs.org/api/globals.html#class-countqueuingstrategy

                                        Type #

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

                                        interface DecompressionStream

                                        Usage in Deno

                                        import { type DecompressionStream } from "node:stream/web";
                                        

                                        Properties #

                                        variable DecompressionStream

                                        DecompressionStream class is a global reference for import { DecompressionStream } from 'node:stream/web'. https://nodejs.org/api/globals.html#class-decompressionstream

                                        Type #

                                        globalThis extends { onmessage: any; ReportingObserver: any; DecompressionStream: infer T extends object; } ? T : globalThis extends { onmessage: any; TransformStream: { prototype: infer T; }; } ? { prototype: T; } : stream/web


                                        interface QueuingStrategyInit

                                        Usage in Deno

                                        import { type QueuingStrategyInit } from "node:stream/web";
                                        

                                        Properties #

                                        Creates a new ByteLengthQueuingStrategy with the provided high water mark.

                                        Note that the provided high water mark will not be validated ahead of time. Instead, if it is negative, NaN, or not a number, the resulting ByteLengthQueuingStrategy will cause the corresponding stream constructor to throw.


                                        interface QueuingStrategySize

                                        Usage in Deno

                                        import { type QueuingStrategySize } from "node:stream/web";
                                        

                                        Type Parameters #

                                        #T = any

                                        Call Signatures #

                                        (chunk?: T): number

                                        interface ReadableByteStreamController

                                        Usage in Deno

                                        import { type ReadableByteStreamController } from "node:stream/web";
                                        

                                        Properties #

                                        #byobRequest: undefined
                                        readonly
                                        #desiredSize: number | null
                                        readonly

                                        Methods #

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

                                        variable ReadableByteStreamController

                                        ReadableByteStreamController class is a global reference for import { ReadableByteStreamController } from 'node:stream/web'. https://nodejs.org/api/globals.html#class-readablebytestreamcontroller

                                        Type #

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


                                        interface ReadableStream

                                        Usage in Deno

                                        import { type ReadableStream } from "node:stream/web";
                                        

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

                                        Type Parameters #

                                        #R = any

                                        Properties #

                                        #locked: boolean
                                        readonly

                                        Methods #

                                        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


                                        interface ReadableStreamBYOBReader

                                        Usage in Deno

                                        import { type ReadableStreamBYOBReader } from "node:stream/web";
                                        

                                        Methods #

                                        #read<T extends ArrayBufferView>(
                                        view: T,
                                        options?: { min?: number; },
                                        ): Promise<ReadableStreamReadResult<T>>

                                        variable ReadableStreamBYOBReader

                                        ReadableStreamBYOBReader class is a global reference for import { ReadableStreamBYOBReader } from 'node:stream/web'. https://nodejs.org/api/globals.html#class-readablestreambyobreader

                                        Type #

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

                                        interface ReadableStreamBYOBRequest

                                        Usage in Deno

                                        import { type ReadableStreamBYOBRequest } from "node:stream/web";
                                        

                                        Properties #

                                        #view: ArrayBufferView | null
                                        readonly

                                        Methods #

                                        #respond(bytesWritten: number): void
                                        #respondWithNewView(view: ArrayBufferView): void

                                        variable ReadableStreamBYOBRequest

                                        ReadableStreamBYOBRequest class is a global reference for import { ReadableStreamBYOBRequest } from 'node:stream/web'. https://nodejs.org/api/globals.html#class-readablestreambyobrequest

                                        Type #

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

                                        interface ReadableStreamDefaultController

                                        Usage in Deno

                                        import { type ReadableStreamDefaultController } from "node:stream/web";
                                        

                                        Type Parameters #

                                        #R = any

                                        Properties #

                                        #desiredSize: number | null
                                        readonly

                                        Methods #

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

                                        Type Parameters #

                                        #R = any

                                        variable ReadableStreamDefaultController

                                        ReadableStreamDefaultController class is a global reference for import { ReadableStreamDefaultController } from 'node:stream/web'. https://nodejs.org/api/globals.html#class-readablestreamdefaultcontroller

                                        Type #

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

                                        interface ReadableStreamDefaultReader

                                        Usage in Deno

                                        import { type ReadableStreamDefaultReader } from "node:stream/web";
                                        

                                        Type Parameters #

                                        #R = any

                                        Methods #

                                        Type Parameters #

                                        #R = any

                                        variable ReadableStreamDefaultReader

                                        ReadableStreamDefaultReader class is a global reference for import { ReadableStreamDefaultReader } from 'node:stream/web'. https://nodejs.org/api/globals.html#class-readablestreamdefaultreader

                                        Type #

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

                                        interface ReadableStreamErrorCallback

                                        Usage in Deno

                                        import { type ReadableStreamErrorCallback } from "node:stream/web";
                                        

                                        Call Signatures #

                                        (reason: any): void | PromiseLike<void>


                                        interface ReadableStreamGetReaderOptions

                                        Usage in Deno

                                        import { type ReadableStreamGetReaderOptions } from "node:stream/web";
                                        

                                        Properties #

                                        Creates a ReadableStreamBYOBReader and locks the stream to the new reader.

                                        This call behaves the same way as the no-argument variant, except that it only works on readable byte streams, i.e. streams which were constructed specifically with the ability to handle "bring your own buffer" reading. The returned BYOB reader provides the ability to directly read individual chunks from the stream via its read() method, into developer-supplied buffers, allowing more precise control over allocation.




                                        interface ReadableWritablePair

                                        Usage in Deno

                                        import { type ReadableWritablePair } from "node:stream/web";
                                        

                                        Type Parameters #

                                        #R = any
                                        #W = any

                                        Properties #

                                        Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use.

                                        Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.


                                        interface StreamPipeOptions

                                        Usage in Deno

                                        import { type StreamPipeOptions } from "node:stream/web";
                                        

                                        Properties #

                                        #preventAbort: boolean
                                        optional
                                        #preventCancel: boolean
                                        optional
                                        #preventClose: boolean
                                        optional

                                        Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.

                                        Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.

                                        Errors and closures of the source and destination streams propagate as follows:

                                        An error in this source readable stream will abort destination, unless preventAbort is truthy. The returned promise will be rejected with the source's error, or with any error that occurs during aborting the destination.

                                        An error in destination will cancel this source readable stream, unless preventCancel is truthy. The returned promise will be rejected with the destination's error, or with any error that occurs during canceling the source.

                                        When this source readable stream closes, destination will be closed, unless preventClose is truthy. The returned promise will be fulfilled once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.

                                        If destination starts out closed or closing, this source readable stream will be canceled, unless preventCancel is true. The returned promise will be rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.

                                        The signal option can be set to an AbortSignal to allow aborting an ongoing pipe operation via the corresponding AbortController. In this case, this source readable stream will be canceled, and destination aborted, unless the respective options preventCancel or preventAbort are set.

                                        #signal: AbortSignal
                                        optional


                                        interface TextDecoderStream

                                        Usage in Deno

                                        import { type TextDecoderStream } from "node:stream/web";
                                        

                                        Properties #

                                        #encoding: string
                                        readonly

                                        Returns encoding's name, lower cased.

                                        #fatal: boolean
                                        readonly

                                        Returns true if error mode is "fatal", and false otherwise.

                                        #ignoreBOM: boolean
                                        readonly

                                        Returns true if ignore BOM flag is set, and false otherwise.

                                        #readable: ReadableStream<string>
                                        readonly
                                        #[[Symbol.toStringTag]]: string
                                        readonly

                                        variable TextDecoderStream

                                        TextDecoderStream class is a global reference for import { TextDecoderStream } from 'node:stream/web'. https://nodejs.org/api/globals.html#class-textdecoderstream

                                        Type #

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

                                        interface TextEncoderStream

                                        Usage in Deno

                                        import { type TextEncoderStream } from "node:stream/web";
                                        

                                        Properties #

                                        #encoding: "utf-8"
                                        readonly

                                        Returns "utf-8".

                                        #readable: ReadableStream<Uint8Array>
                                        readonly
                                        #writable: WritableStream<string>
                                        readonly
                                        #[[Symbol.toStringTag]]: string
                                        readonly

                                        variable TextEncoderStream

                                        TextEncoderStream class is a global reference for import { TextEncoderStream } from 'node:stream/web'. https://nodejs.org/api/globals.html#class-textencoderstream

                                        Type #

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





                                        interface TransformStream

                                        Usage in Deno

                                        import { type TransformStream } from "node:stream/web";
                                        

                                        Type Parameters #

                                        #I = any
                                        #O = any

                                        Properties #

                                        Type Parameters #

                                        #I = any
                                        #O = any

                                        variable TransformStream

                                        TransformStream class is a global reference for import { TransformStream } from 'node:stream/web'. https://nodejs.org/api/globals.html#class-transformstream

                                        Type #

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

                                        interface TransformStreamDefaultController

                                        Usage in Deno

                                        import { type TransformStreamDefaultController } from "node:stream/web";
                                        

                                        Type Parameters #

                                        #O = any

                                        Properties #

                                        #desiredSize: number | null
                                        readonly

                                        Methods #

                                        #enqueue(chunk?: O): void
                                        #error(reason?: any): void
                                        #terminate(): void

                                        Type Parameters #

                                        #O = any

                                        variable TransformStreamDefaultController

                                        TransformStreamDefaultController class is a global reference for import { TransformStreamDefaultController } from 'node:stream/web'. https://nodejs.org/api/globals.html#class-transformstreamdefaultcontroller

                                        Type #

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



                                        interface UnderlyingSinkAbortCallback

                                        Usage in Deno

                                        import { type UnderlyingSinkAbortCallback } from "node:stream/web";
                                        

                                        Call Signatures #

                                        (reason?: any): void | PromiseLike<void>

                                        interface UnderlyingSinkCloseCallback

                                        Usage in Deno

                                        import { type UnderlyingSinkCloseCallback } from "node:stream/web";
                                        

                                        Call Signatures #

                                        (): void | PromiseLike<void>




                                        interface UnderlyingSourceCancelCallback

                                        Usage in Deno

                                        import { type UnderlyingSourceCancelCallback } from "node:stream/web";
                                        

                                        Call Signatures #

                                        (reason?: any): void | PromiseLike<void>



                                        interface WritableStream

                                        Usage in Deno

                                        import { type WritableStream } from "node:stream/web";
                                        

                                        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 back pressure and queuing.

                                        Type Parameters #

                                        #W = any

                                        Properties #

                                        #locked: boolean
                                        readonly

                                        Methods #

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

                                        Type Parameters #

                                        #W = any

                                        variable WritableStream

                                        WritableStream class is a global reference for import { WritableStream } from 'node:stream/web'. https://nodejs.org/api/globals.html#class-writablestream

                                        Type #

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

                                        interface WritableStreamDefaultController

                                        Usage in Deno

                                        import { type WritableStreamDefaultController } from "node:stream/web";
                                        

                                        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.

                                        Methods #

                                        #error(e?: any): void

                                        variable WritableStreamDefaultController

                                        WritableStreamDefaultController class is a global reference for import { WritableStreamDefaultController } from 'node:stream/web'. https://nodejs.org/api/globals.html#class-writablestreamdefaultcontroller

                                        Type #

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

                                        interface WritableStreamDefaultWriter

                                        Usage in Deno

                                        import { type WritableStreamDefaultWriter } from "node:stream/web";
                                        

                                        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<undefined>
                                        readonly
                                        #desiredSize: number | null
                                        readonly
                                        #ready: Promise<undefined>
                                        readonly

                                        Methods #

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

                                        Type Parameters #

                                        #W = any

                                        variable WritableStreamDefaultWriter

                                        WritableStreamDefaultWriter class is a global reference for import { WritableStreamDefaultWriter } from 'node:stream/web'. https://nodejs.org/api/globals.html#class-writablestreamdefaultwriter

                                        Type #

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

                                        type alias BufferSource

                                        Usage in Deno

                                        import { type BufferSource } from "node:stream/web";
                                        

                                        Definition #

                                        ArrayBufferView | ArrayBuffer



                                        type alias ReadableStreamReaderMode

                                        Usage in Deno

                                        import { type ReadableStreamReaderMode } from "node:stream/web";
                                        

                                        Definition #

                                        "byob"


                                        Did you find what you needed?

                                        Privacy policy