effect-io-ai

Package: @effect/platform-node-shared
Module: NodeSink

NodeSink.fromWritable

Creates a Sink that writes chunks to a Node writable stream, respecting backpressure, mapping writable errors with onError, and ending the stream on completion unless endOnDone is false.

Signature

declare const fromWritable: <E, A = string | Uint8Array<ArrayBufferLike>>(options: { readonly evaluate: LazyArg<Writable | NodeJS.WritableStream>; readonly onError: (error: unknown) => E; readonly endOnDone?: boolean | undefined; readonly encoding?: BufferEncoding | undefined; }) => Sink.Sink<void, A, never, E>

Source

Since v4.0.0