UNPKG

the-moby-effect

Version:
18 lines 1.31 kB
import type * as Effect from "effect/Effect"; import type * as Schema from "effect/Schema"; import type * as Stream from "effect/Stream"; import type * as Socket from "effect/unstable/socket/Socket"; import * as Sink from "effect/Sink"; import type * as MobyDemux from "../../MobyDemux.js"; /** * Demux either a raw socket or a multiplexed socket to a single sink. * * @since 1.0.0 * @category Demux */ export declare const demuxToSingleSink: (<A1, L1, E1, E2, R1, R2>(source: Stream.Stream<string | Uint8Array, E1, R1>, sink: Sink.Sink<A1, string, L1, E2, R2>, options?: { encoding?: string | undefined; } | undefined) => <IE = never, OE = Socket.SocketError, R3 = never>(sockets: MobyDemux.EitherRawInput<E1 | IE, OE, R3> | MobyDemux.EitherMultiplexedInput<E1 | IE, OE, R3>) => Effect.Effect<A1, E1 | E2 | IE | OE | Schema.SchemaError, R1 | R2 | R3>) & (<A1, L1, E1, E2, R1, R2, IE = never, OE = Socket.SocketError, R3 = never>(sockets: MobyDemux.EitherRawInput<E1 | IE, OE, R3> | MobyDemux.EitherMultiplexedInput<E1 | IE, OE, R3>, source: Stream.Stream<string | Uint8Array, E1, R1>, sink: Sink.Sink<A1, string, L1, E2, R2>, options?: { encoding?: string | undefined; } | undefined) => Effect.Effect<A1, E1 | E2 | IE | OE | Schema.SchemaError, R1 | R2 | R3>); //# sourceMappingURL=demux.d.ts.map