import { Ref } from "@effect/core/io/Ref/definition"; import { Deferred } from "@effect/core/io/Deferred/definition"; import { Effect } from "@effect/core/io/Effect/definition"; import { Maybe } from "@tsplus/stdlib/data/Maybe/definition"; /** * A synchronous queue-like abstraction that allows a producer to offer an * element and wait for it to be taken, and allows a consumer to wait for an * element to be available. * * @tsplus type effect/core/stream/Stream/Handoff * @tsplus companion effect/core/stream/Stream/Handoff.Ops */ export declare class Handoff { readonly ref: Ref>; constructor(ref: Ref>); } export type HandoffState = Empty | Full; export declare class Empty { readonly notifyConsumer: Deferred; readonly _tag = "Empty"; constructor(notifyConsumer: Deferred); } export declare class Full { readonly value: A; readonly notifyProducer: Deferred; readonly _tag = "Full"; constructor(value: A, notifyProducer: Deferred); } /** * @tsplus static effect/core/stream/Stream/Handoff.Ops make * @tsplus location "@effect/core/stream/Stream/operations/_internal/Handoff" */ export declare function make(): Effect>; /** * @tsplus static effect/core/stream/Stream/Handoff.Aspects offer * @tsplus pipeable effect/core/stream/Stream/Handoff offer * @tsplus location "@effect/core/stream/Stream/operations/_internal/Handoff" */ export declare function offer(value: A): (self: Handoff) => Effect; /** * @tsplus getter effect/core/stream/Stream/Handoff take * @tsplus location "@effect/core/stream/Stream/operations/_internal/Handoff" */ export declare function take(self: Handoff): Effect; /** * @tsplus getter effect/core/stream/Stream/Handoff poll * @tsplus location "@effect/core/stream/Stream/operations/_internal/Handoff" */ export declare function poll(self: Handoff): Effect>; //# sourceMappingURL=Handoff.d.ts.map