import type * as C from "../../../Cause/index.js"; import * as A from "../../../Collections/Immutable/Chunk/index.js"; import * as T from "../../../Effect/index.js"; import * as O from "../../../Option/index.js"; import * as P from "../../../Promise/index.js"; import * as Ref from "../../../Ref/index.js"; import type * as SER from "./SinkEndReason.js"; export declare class Handoff { readonly ref: Ref.Ref>; constructor(ref: Ref.Ref>); } export declare function make(): T.Effect>; export declare const StateTypeId: unique symbol; export declare const EmptyTypeId: unique symbol; export declare class Empty { readonly notifyConsumer: P.Promise; readonly _stateTypeId: typeof StateTypeId; readonly _typeId: typeof EmptyTypeId; constructor(notifyConsumer: P.Promise); } export declare const FullTypeId: unique symbol; export declare class Full { readonly a: A; readonly notifyConsumer: P.Promise; readonly _stateTypeId: typeof StateTypeId; readonly _typeId: typeof FullTypeId; constructor(a: A, notifyConsumer: P.Promise); } export declare type State = Empty | Full; export declare function offer(handoff: Handoff, a: A): T.UIO; export declare function take(handoff: Handoff): T.UIO; export declare function poll(handoff: Handoff): T.UIO>; export declare const HandoffSignalTypeId: unique symbol; export declare const EmitTypeId: unique symbol; export declare class Emit { readonly els: A.Chunk; readonly _handoffSignalTypeId: typeof HandoffSignalTypeId; readonly _typeId: typeof EmitTypeId; constructor(els: A.Chunk); } export declare const HaltTypeId: unique symbol; export declare class Halt { readonly error: C.Cause; readonly _handoffSignalTypeId: typeof HandoffSignalTypeId; readonly _typeId: typeof HaltTypeId; constructor(error: C.Cause); } export declare const EndTypeId: unique symbol; export declare class End { readonly reason: SER.SinkEndReason; readonly _handoffSignalTypeId: typeof HandoffSignalTypeId; readonly _typeId: typeof EndTypeId; constructor(reason: SER.SinkEndReason); } export declare type HandoffSignal = Emit | Halt | End; //# sourceMappingURL=Handoff.d.ts.map