Package: @effect/platform-node-shared
Module: NodeStream
Consumes a Node readable stream into an ArrayBuffer, failing through
onError on stream errors or when maxBytes is exceeded and destroying the
stream on interruption or failure.
Signature
declare const toArrayBuffer: <E = Cause.UnknownError>(readable: LazyArg<Readable | NodeJS.ReadableStream>, options?: { readonly onError?: (error: unknown) => E; readonly maxBytes?: SizeInput | undefined; }) => Effect.Effect<ArrayBuffer, E>
Since v4.0.0