Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/proc/src/api2/proc-readable-stream.ts>ProcReadableStream

A high-level way to run child processes that is easy, flexible, powerful, and prevents resource leaks.
Go to Latest
class ProcReadableStream
implements ReadableStream<R>
import { ProcReadableStream } from "https://deno.land/x/proc@0.20.10/src/api2/proc-readable-stream.ts";

Constructors

new
ProcReadableStream(source: ReadableStream<R>)

Properties

readonly
locked: boolean

Methods

cancel(reason?: unknown): Promise<void>
getReader(options: { mode: "byob"; }): ReadableStreamBYOBReader
getReader(options?: { mode?: undefined; }): ReadableStreamDefaultReader<R>
pipeThrough<T>(transform: { writable: WritableStream<R>; readable: ReadableStream<T>; }, options?: PipeOptions): ProcReadableStream<T>
pipeTo(dest: WritableStream<R>, options?: PipeOptions): Promise<void>
run(options: RunFnOptions, ...cmd: Cmd): ProcChildProcess

Run a process.

Note that this is not type safe. This should only be called on a ProcReadableStream<Uint8Array>. Calling this for other types will cause a runtime error.

Run a process.

Note that this is not type safe. This should only be called on a ProcReadableStream<Uint8Array>. Calling this for other types will cause a runtime error.

[Symbol.asyncIterator](options?: { preventCancel?: boolean; }): AsyncIterableIterator<R>