import { Lazy } from "@tsplus/stdlib/data/Function"; import { Cause } from "@effect/core/io/Cause/definition"; import { Effect } from "@effect/core/io/Effect/definition"; import { Exit } from "@effect/core/io/Exit/definition"; import { Env } from "@tsplus/stdlib/service/Env"; import type { ChildExecutorDecision } from "@effect/core/stream/Channel/ChildExecutorDecision"; import type { Channel } from "@effect/core/stream/Channel/definition/base"; import { ChannelBase } from "@effect/core/stream/Channel/definition/base"; import { _Env, _InDone, _InElem, _InErr, _OutDone, _OutDone2, _OutElem, _OutErr, _OutErr2 } from "@effect/core/stream/Channel/definition/symbols"; import type { AsyncInputProducer } from "@effect/core/stream/Channel/SingleProducerAsyncInput"; import type { UpstreamPullRequest } from "@effect/core/stream/Channel/UpstreamPullRequest"; import type { UpstreamPullStrategy } from "@effect/core/stream/Channel/UpstreamPullStrategy"; export declare class PipeTo extends ChannelBase { readonly left: Lazy>; readonly right: Lazy>; readonly _tag = "PipeTo"; constructor(left: Lazy>, right: Lazy>); } export declare class Read extends ChannelBase { readonly more: (i: InElem) => Channel; readonly done: ContinuationK; readonly _tag = "Read"; constructor(more: (i: InElem) => Channel, done: ContinuationK); } export declare class SucceedNow extends ChannelBase { readonly terminal: OutDone; readonly _tag = "SucceedNow"; constructor(terminal: OutDone); } export declare class Fail extends ChannelBase { readonly error: Lazy>; readonly _tag = "Fail"; constructor(error: Lazy>); } export declare class FromEffect extends ChannelBase { readonly effect: Effect; readonly _tag = "FromEffect"; constructor(effect: Effect); } export declare class Emit extends ChannelBase { readonly out: OutElem; readonly _tag = "Emit"; constructor(out: OutElem); } export declare class Succeed extends ChannelBase { readonly effect: Lazy; readonly _tag = "Succeed"; constructor(effect: Lazy); } export declare class Suspend extends ChannelBase { readonly effect: Lazy>; readonly _tag = "Suspend"; constructor(effect: Lazy>); } export declare class Ensuring extends ChannelBase { readonly channel: Channel; readonly finalizer: (exit: Exit) => Effect; readonly _tag = "Ensuring"; constructor(channel: Channel, finalizer: (exit: Exit) => Effect); } export declare class ConcatAll extends ChannelBase { readonly combineInners: (x: OutDone, y: OutDone) => OutDone; readonly combineAll: (x: OutDone, y: OutDone2) => OutDone3; readonly onPull: (pr: UpstreamPullRequest) => UpstreamPullStrategy; readonly onEmit: (o: OutElem2) => ChildExecutorDecision; readonly value: Lazy>; readonly k: (o: OutElem) => Channel; readonly _tag = "ConcatAll"; constructor(combineInners: (x: OutDone, y: OutDone) => OutDone, combineAll: (x: OutDone, y: OutDone2) => OutDone3, onPull: (pr: UpstreamPullRequest) => UpstreamPullStrategy, onEmit: (o: OutElem2) => ChildExecutorDecision, value: Lazy>, k: (o: OutElem) => Channel); } export declare class Fold extends ChannelBase { readonly value: Channel; readonly k: ContinuationK; readonly _tag = "Fold"; constructor(value: Channel, k: ContinuationK); } export declare class Bridge extends ChannelBase { readonly input: AsyncInputProducer; readonly channel: Channel; readonly _tag = "Bridge"; constructor(input: AsyncInputProducer, channel: Channel); } export declare class BracketOut extends ChannelBase { readonly acquire: Lazy>; readonly finalizer: (z: Z, exit: Exit) => Effect; readonly _tag = "BracketOut"; constructor(acquire: Lazy>, finalizer: (z: Z, exit: Exit) => Effect); } export declare class Provide extends ChannelBase { readonly env: Env; readonly channel: Channel; readonly _tag = "Provide"; constructor(env: Env, channel: Channel); } /** * @tsplus macro remove */ export declare function concrete(_: Channel): asserts _ is PipeTo | Read | SucceedNow | Fail | FromEffect | Emit | Succeed | Suspend | Ensuring | ConcatAll | Fold | Bridge | BracketOut | Provide; export declare abstract class Continuation { readonly [_Env]: () => Env; readonly [_InErr]: (_: InErr) => void; readonly [_InElem]: (_: InElem) => void; readonly [_InDone]: (_: InDone) => void; readonly [_OutErr]: (_: OutErr) => OutErr; readonly [_OutDone]: (_: OutDone) => OutDone; readonly [_OutErr2]: () => OutErr2; readonly [_OutElem]: () => OutElem; readonly [_OutDone2]: () => OutDone2; } /** * @tsplus macro remove */ export declare function concreteContinuation(_: Continuation): asserts _ is ContinuationK | ContinuationFinalizer; export declare class ContinuationK extends Continuation { readonly onSuccess: (o: OutDone) => Channel; readonly onHalt: (c: Cause) => Channel; readonly _tag = "ContinuationK"; constructor(onSuccess: (o: OutDone) => Channel, onHalt: (c: Cause) => Channel); onExit(exit: Exit): Channel; } export declare class ContinuationFinalizer extends Continuation { readonly finalizer: (exit: Exit) => Effect; readonly _tag = "ContinuationFinalizer"; constructor(finalizer: (exit: Exit) => Effect); } //# sourceMappingURL=primitives.d.ts.map