Skip to content

BunStream.ts

Bun stream interoperability for Effect streams.

This module is the Bun entry point for adapting runtime streams into Effect’s streaming model. It re-exports the shared Node stream adapters for Bun’s Node-compatible stream APIs and adds fromReadableStream, a Web ReadableStream adapter that uses Bun’s readMany reader method to pull batches of values into an Effect Stream.

Since v4.0.0



Creates a stream from a ReadableStream using Bun’s optimized .readMany API.

Signature

declare const fromReadableStream: <A, E>(options: {
readonly evaluate: LazyArg<ReadableStream<A>>
readonly onError: (error: unknown) => E
readonly releaseLockOnEnd?: boolean | undefined
}) => Stream.Stream<A, E>

Source

Since v4.0.0

“@effect/platform-node-shared/NodeStream” (namespace export)

Section titled ““@effect/platform-node-shared/NodeStream” (namespace export)”

Re-exports all named exports from the “@effect/platform-node-shared/NodeStream” module.

Signature

export * from "@effect/platform-node-shared/NodeStream"

Source

Since v4.0.0