stream/web
Usage in Deno
import * as mod from "node:stream/web";
Interfaces
This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
This Streams API interface represents a readable stream of byte data.
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.
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
interface ByteLengthQueuingStrategy
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 #size: QueuingStrategySize<ArrayBufferView> variable ByteLengthQueuingStrategy
Properties #
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 #
#readable: ReadableStream #writable: WritableStream variable CompressionStream
Properties #
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 #size: QueuingStrategySize variable CountQueuingStrategy
Properties #
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 #
#writable: WritableStream #readable: ReadableStream variable DecompressionStream
Properties #
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 QueuingStrategy
Usage in Deno
import { type QueuingStrategy } from "node:stream/web";
Type Parameters #
#T = any Properties #
#highWaterMark: number #size: QueuingStrategySize<T> interface QueuingStrategyInit
Usage in Deno
import { type QueuingStrategyInit } from "node:stream/web";
Properties #
#highWaterMark: number 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";
interface ReadableByteStreamController
Usage in Deno
import { type ReadableByteStreamController } from "node:stream/web";
variable ReadableByteStreamController
Properties #
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 ReadableByteStreamControllerCallback
Usage in Deno
import { type ReadableByteStreamControllerCallback } from "node:stream/web";
Call Signatures #
(controller: ReadableByteStreamController): void | PromiseLike<void> 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 #
Methods #
#getReader(options: { mode: "byob"; }): ReadableStreamBYOBReader #getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<R> #pipeThrough<T>(transform: ReadableWritablePair<T, R>,options?: StreamPipeOptions,): ReadableStream<T> #pipeTo(destination: WritableStream<R>,options?: StreamPipeOptions,): Promise<void> #tee(): [ReadableStream<R>, ReadableStream<R>] #values(options?: { preventCancel?: boolean; }): ReadableStreamAsyncIterator<R> 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 ReadableStreamAsyncIterator
Usage in Deno
import { type ReadableStreamAsyncIterator } from "node: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>> #releaseLock(): void variable ReadableStreamBYOBReader
Properties #
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 #
Methods #
#respondWithNewView(view: ArrayBufferView): void variable ReadableStreamBYOBRequest
Properties #
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";
variable ReadableStreamDefaultController
Properties #
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";
variable ReadableStreamDefaultReader
Properties #
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 #
#mode: ReadableStreamReaderMode 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 #
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 #preventCancel: boolean #preventClose: boolean 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.
interface TextDecoderStream
Usage in Deno
import { type TextDecoderStream } from "node:stream/web";
Properties #
#readable: ReadableStream<string> #writable: WritableStream<BufferSource> #[[Symbol.toStringTag]]: string variable TextDecoderStream
Properties #
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 #
#readable: ReadableStream<Uint8Array> #writable: WritableStream<string> #[[Symbol.toStringTag]]: string variable TextEncoderStream
Properties #
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 Transformer
Usage in Deno
import { type Transformer } from "node:stream/web";
Type Parameters #
Properties #
#flush: TransformerFlushCallback<O> #readableType: undefined #start: TransformerStartCallback<O> #transform: TransformerTransformCallback<I, O> #writableType: undefined interface TransformerFlushCallback
Usage in Deno
import { type TransformerFlushCallback } from "node:stream/web";
Type Parameters #
#O Call Signatures #
(controller: TransformStreamDefaultController<O>): void | PromiseLike<void> interface TransformerStartCallback
Usage in Deno
import { type TransformerStartCallback } from "node:stream/web";
Type Parameters #
#O Call Signatures #
(controller: TransformStreamDefaultController<O>): any interface TransformerTransformCallback
Usage in Deno
import { type TransformerTransformCallback } from "node:stream/web";
interface TransformStream
Usage in Deno
import { type TransformStream } from "node:stream/web";
variable TransformStream
Properties #
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";
variable TransformStreamDefaultController
Properties #
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 UnderlyingByteSource
Usage in Deno
import { type UnderlyingByteSource } from "node:stream/web";
Properties #
#autoAllocateChunkSize: number #cancel: ReadableStreamErrorCallback #pull: ReadableByteStreamControllerCallback #start: ReadableByteStreamControllerCallback interface UnderlyingSink
Usage in Deno
import { type UnderlyingSink } from "node:stream/web";
Type Parameters #
#W = any Properties #
#abort: UnderlyingSinkAbortCallback #close: UnderlyingSinkCloseCallback #start: UnderlyingSinkStartCallback #write: UnderlyingSinkWriteCallback<W> 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 UnderlyingSinkStartCallback
Usage in Deno
import { type UnderlyingSinkStartCallback } from "node:stream/web";
Call Signatures #
(controller: WritableStreamDefaultController): any interface UnderlyingSinkWriteCallback
Usage in Deno
import { type UnderlyingSinkWriteCallback } from "node:stream/web";
Type Parameters #
#W Call Signatures #
(chunk: W,controller: WritableStreamDefaultController,): void | PromiseLike<void> interface UnderlyingSource
Usage in Deno
import { type UnderlyingSource } from "node:stream/web";
interface UnderlyingSourceCancelCallback
Usage in Deno
import { type UnderlyingSourceCancelCallback } from "node:stream/web";
Call Signatures #
(reason?: any): void | PromiseLike<void> interface UnderlyingSourcePullCallback
Usage in Deno
import { type UnderlyingSourcePullCallback } from "node:stream/web";
Type Parameters #
#R Call Signatures #
(controller: ReadableStreamController<R>): void | PromiseLike<void> interface UnderlyingSourceStartCallback
Usage in Deno
import { type UnderlyingSourceStartCallback } from "node:stream/web";
Type Parameters #
#R Call Signatures #
(controller: ReadableStreamController<R>): any interface WritableStream
Usage in Deno
import { type WritableStream } from "node:stream/web";
variable WritableStream
Properties #
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";
variable WritableStreamDefaultController
Properties #
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";
variable WritableStreamDefaultWriter
Properties #
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 ReadableStreamController
Usage in Deno
import { type ReadableStreamController } from "node:stream/web";
type alias ReadableStreamReader
Usage in Deno
import { type ReadableStreamReader } from "node:stream/web";
type alias ReadableStreamReaderMode
Usage in Deno
import { type ReadableStreamReaderMode } from "node:stream/web";
Definition #
"byob" type alias ReadableStreamReadResult
Usage in Deno
import { type ReadableStreamReadResult } from "node:stream/web";