import "../../../Operator/index.js"; import * as Cause from "../../../Cause/index.js"; import type * as T from "../../../Effect/index.js"; import type * as Exit from "../../../Exit/index.js"; import * as P from "./_internal/primitives.js"; import type * as PR from "./_internal/producer.js"; export type { SingleProducerAsyncInput, AsyncInputProducer, AsyncInputConsumer } from "./_internal/producer.js"; export { makeSingleProducerAsyncInput } from "./_internal/producer.js"; export * from "./_internal/primitives.js"; /** * Pipe the output of a channel into the input of another */ export declare function pipeTo_(left: P.Channel, right: P.Channel): P.Channel; /** * Pipe the output of a channel into the input of another * * @ets_data_first pipeTo_ */ export declare function pipeTo(right: P.Channel): (left: P.Channel) => P.Channel; /** * Reads an input and continue exposing both full error cause and completion */ export declare function readWithCause(inp: (i: InElem) => P.Channel, halt: (e: Cause.Cause) => P.Channel, done: (d: InDone) => P.Channel): P.Channel; /** * End a channel with the specified result */ export declare function endWith(result: () => OutDone): P.Channel; /** * End a channel with the specified result */ export declare function end(result: OutDone): P.Channel; /** * Halt a channel with the specified cause */ export declare function failCauseWith(result: () => Cause.Cause): P.Channel; /** * Halt a channel with the specified cause */ export declare function failCause(result: Cause.Cause): P.Channel; /** * Halt a channel with the specified error */ export declare function failWith(error: () => E): P.Channel; /** * Halt a channel with the specified error */ export declare function fail(error: E): P.Channel; /** * Halt a channel with the specified exception */ export declare function die(defect: unknown): P.Channel; /** * Halt a channel with the specified exception */ export declare function dieWith(defect: () => unknown): P.Channel; /** * Writes an output to the channel */ export declare function writeWith(out: () => OutElem): P.Channel; /** * Writes an output to the channel */ export declare function write(out: OutElem): P.Channel; /** * Returns a new channel with an attached finalizer. The finalizer is guaranteed to be executed * so long as the channel begins execution (and regardless of whether or not it completes). */ export declare function ensuringWith_(channel: P.Channel, finalizer: (e: Exit.Exit) => T.Effect): P.Channel; /** * Returns a new channel with an attached finalizer. The finalizer is guaranteed to be executed * so long as the channel begins execution (and regardless of whether or not it completes). * * @ets_data_first ensuringWith_ */ export declare function ensuringWith(finalizer: (e: Exit.Exit) => T.Effect): (channel: P.Channel) => P.Channel; /** * Returns a new channel whose outputs are fed to the specified factory function, which creates * new channels in response. These new channels are sequentially concatenated together, and all * their outputs appear as outputs of the newly returned channel. The provided merging function * is used to merge the terminal values of all channels into the single terminal value of the * returned channel. */ export declare function concatMapWith_(self: P.Channel, f: (o: OutElem) => P.Channel, g: (o: OutDone, o1: OutDone) => OutDone, h: (o: OutDone, o2: OutDone2) => OutDone3): P.Channel; /** * Returns a new channel whose outputs are fed to the specified factory function, which creates * new channels in response. These new channels are sequentially concatenated together, and all * their outputs appear as outputs of the newly returned channel. The provided merging function * is used to merge the terminal values of all channels into the single terminal value of the * returned channel. * * @ets_data_first concatMapWith_ */ export declare function concatMapWith(f: (o: OutElem) => P.Channel, g: (o: OutDone, o1: OutDone) => OutDone, h: (o: OutDone, o2: OutDone2) => OutDone3): (self: P.Channel) => P.Channel; /** * Concat sequentially a channel of channels */ export declare function concatAllWith_(channels: P.Channel, OutDone2>, f: (o: OutDone, o1: OutDone) => OutDone, g: (o: OutDone, o2: OutDone2) => OutDone3): P.Channel; /** * Concat sequentially a channel of channels * * @ets_data_first concatAllWith_ */ export declare function concatAllWith(f: (o: OutDone, o1: OutDone) => OutDone, g: (o: OutDone, o2: OutDone2) => OutDone3): (channels: P.Channel, OutDone2>) => P.Channel; /** * Fold the channel exposing success and full error cause */ export declare function foldCauseChannel_(self: P.Channel, onErr: (c: Cause.Cause) => P.Channel, onSucc: (o: OutDone) => P.Channel): P.Channel; /** * Fold the channel exposing success and full error cause * * @ets_data_first foldCauseChannel_ */ export declare function foldCauseChannel(onErr: (c: Cause.Cause) => P.Channel, onSucc: (o: OutDone) => P.Channel): (self: P.Channel) => P.Channel; /** * Embed inputs from continuos pulling of a producer */ export declare function embedInput_(self: P.Channel, input: PR.AsyncInputProducer): P.Channel; /** * Embed inputs from continuos pulling of a producer * * @ets_data_first embedInput_ */ export declare function embedInput(input: PR.AsyncInputProducer): (self: P.Channel) => P.Channel; /** * Construct a resource Channel with Acquire / Release */ export declare function acquireReleaseOutExitWith_(self: T.Effect, release: (z: Z, e: Exit.Exit) => T.RIO): P.Channel; /** * Construct a resource Channel with Acquire / Release * * @ets_data_first acquireReleaseOutExitWith_ */ export declare function acquireReleaseOutExitWith(release: (z: Z, e: Exit.Exit) => T.RIO): (self: T.Effect) => P.Channel; /** * Provides the channel with its required environment, which eliminates * its dependency on `Env`. */ export declare function provideAll_(self: P.Channel, env: Env): P.Channel; /** * Provides the channel with its required environment, which eliminates * its dependency on `Env`. * * @ets_data_first provideAll_ */ export declare function provideAll(env: Env): (self: P.Channel) => P.Channel; /** * Returns a new channel, which sequentially combines this channel, together with the provided * factory function, which creates a second channel based on the terminal value of this channel. * The result is a channel that will first perform the functions of this channel, before * performing the functions of the created channel (including yielding its terminal value). */ export declare function chain_(self: P.Channel, f: (d: OutDone) => P.Channel): P.Channel; /** * Returns a new channel, which sequentially combines this channel, together with the provided * factory function, which creates a second channel based on the terminal value of this channel. * The result is a channel that will first perform the functions of this channel, before * performing the functions of the created channel (including yielding its terminal value). * * @ets_data_first chain_ */ export declare function chain(f: (d: OutDone) => P.Channel): (self: P.Channel) => P.Channel; export declare function suspend(effect: () => P.Channel): P.Channel; /** * Use an effect to end a channel */ export declare function fromEffect(self: T.Effect): P.Channel; export declare function succeedWith(effect: () => OutDone): P.Channel; export declare function readOrFail(e: E): P.Channel; /** * Returns a new channel that is the same as this one, except if this channel errors for any * typed error, then the returned channel will switch over to using the fallback channel returned * by the specified error handler. */ export declare function catchAllCause_(self: P.Channel, f: (cause: Cause.Cause) => P.Channel): P.Channel; /** * Returns a new channel that is the same as this one, except if this channel errors for any * typed error, then the returned channel will switch over to using the fallback channel returned * by the specified error handler. * * @ets_data_first catchAllCause_ */ export declare function catchAllCause(f: (cause: Cause.Cause) => P.Channel): (self: P.Channel) => P.Channel; //# sourceMappingURL=core.d.ts.map