/** * @since 1.0.0 */ import type { PlatformError } from "@effect/platform/Error"; import type { SizeInput } from "@effect/platform/FileSystem"; import type { Channel } from "effect/Channel"; import type { Chunk } from "effect/Chunk"; import type { Effect } from "effect/Effect"; import type { LazyArg } from "effect/Function"; import * as Stream from "effect/Stream"; import type { Duplex, Readable } from "node:stream"; /** * @category models * @since 1.0.0 */ export interface FromReadableOptions { /** Defaults to undefined, which lets Node.js decide the chunk size */ readonly chunkSize?: SizeInput; /** Default to true, which means the stream will be closed when done */ readonly closeOnDone?: boolean | undefined; } /** * @category model * @since 1.0.0 */ export interface FromWritableOptions { readonly endOnDone?: boolean; readonly encoding?: BufferEncoding; } /** * @category constructors * @since 1.0.0 */ export declare const fromReadable: >(evaluate: LazyArg, onError: (error: unknown) => E, options?: FromReadableOptions) => Stream.Stream; /** * @category constructors * @since 1.0.0 */ export declare const fromReadableChannel: >(evaluate: LazyArg, onError: (error: unknown) => E, options?: FromReadableOptions | undefined) => Channel, unknown, E>; /** * @category constructors * @since 1.0.0 */ export declare const fromDuplex: (evaluate: LazyArg, onError: (error: unknown) => E, options?: FromReadableOptions & FromWritableOptions) => Channel, Chunk, IE | E, IE, void, unknown>; /** * @category combinators * @since 1.0.0 */ export declare const pipeThroughDuplex: { /** * @category combinators * @since 1.0.0 */ (duplex: LazyArg, onError: (error: unknown) => E2, options?: (FromReadableOptions & FromWritableOptions) | undefined): (self: Stream.Stream) => Stream.Stream; /** * @category combinators * @since 1.0.0 */ (self: Stream.Stream, duplex: LazyArg, onError: (error: unknown) => E2, options?: (FromReadableOptions & FromWritableOptions) | undefined): Stream.Stream; }; /** * @category combinators * @since 1.0.0 */ export declare const pipeThroughSimple: { /** * @category combinators * @since 1.0.0 */ (duplex: LazyArg): (self: Stream.Stream) => Stream.Stream; /** * @category combinators * @since 1.0.0 */ (self: Stream.Stream, duplex: LazyArg): Stream.Stream; }; /** * @since 1.0.0 * @category conversions */ export declare const toReadable: (stream: Stream.Stream) => Effect; /** * @since 1.0.0 * @category conversions */ export declare const toReadableNever: (stream: Stream.Stream) => Readable; /** * @since 1.0.0 * @category conversions */ export declare const toString: (readable: LazyArg, options: { readonly onFailure: (error: unknown) => E; readonly encoding?: BufferEncoding | undefined; readonly maxBytes?: SizeInput | undefined; }) => Effect; /** * @since 1.0.0 * @category conversions */ export declare const toUint8Array: (readable: LazyArg, options: { readonly onFailure: (error: unknown) => E; readonly maxBytes?: SizeInput | undefined; }) => Effect; /** * @since 1.0.0 * @category stdio */ export declare const stdin: Stream.Stream; /** * @since 1.0.0 * @category stdio */ export declare const stdout: Stream.Stream; /** * @since 1.0.0 * @category stdio */ export declare const stderr: Stream.Stream; //# sourceMappingURL=NodeStream.d.ts.map