import type * as O from "../../Option";
import type { Exit } from "../Exit/model";
import type { RuntimeFiber } from "../Fiber";
import * as T from "../Task/_core";
/**
* A hint indicating whether or not to propagate supervision events across
* supervisor hierarchies.
*/
export declare type Propagation = Stop | Continue;
/**
* A hint indicating supervision events no longer require propagation.
*/
export declare class Stop {
readonly _tag = "Stop";
}
/**
* A hint indicating supervision events require further propagation.
*/
export declare class Continue {
readonly _tag = "Continue";
}
export declare const _stop: Stop;
export declare const _continue: Continue;
export declare const propagationAnd: (self: Propagation, that: Propagation) => Propagation;
export declare const propagationOr: (self: Propagation, that: Propagation) => Propagation;
/**
* A `Supervisor` is allowed to supervise the launching and termination of
* fibers, producing some visible value of type `A` from the supervision.
*/
export declare class Supervisor {
readonly value: T.IO;
readonly unsafeOnStart: (
environment: R,
effect: T.Task,
parent: O.Option>,
fiber: RuntimeFiber
) => Propagation;
readonly unsafeOnEnd: (value: Exit, fiber: RuntimeFiber) => Propagation;
constructor(
value: T.IO,
unsafeOnStart: (
environment: R,
effect: T.Task,
parent: O.Option>,
fiber: RuntimeFiber
) => Propagation,
unsafeOnEnd: (value: Exit, fiber: RuntimeFiber) => Propagation
);
/**
* Returns a new supervisor that performs the function of this supervisor,
* and the function of the specified supervisor, producing a tuple of the
* outputs produced by both supervisors.
*
* The composite supervisor indicates that it has fully handled the
* supervision event if only both component supervisors indicate they have
* handled the supervision event.
*/
and(that: Supervisor): Supervisor;
/**
* Returns a new supervisor that performs the function of this supervisor,
* and the function of the specified supervisor, producing a tuple of the
* outputs produced by both supervisors.
*
* The composite supervisor indicates that it has fully handled the
* supervision event if either component supervisors indicate they have
* handled the supervision event.
*/
or(that: Supervisor): Supervisor;
}
//# sourceMappingURL=model.d.ts.map