import * as E from "../../../Either"; import * as O from "../../../Option"; import * as Sy from "../../../Sync"; import type { FiberId } from "../../Fiber/FiberId"; import type { Cause } from "./model"; /** * ```haskell * as :: Functor f => b -> f a -> f b * ``` * * Substitutes a value under a type constructor * * @category Combinators * @since 1.0.0 */ export declare const as: (e: E1) => (fa: Cause) => Cause; /** * Extracts a list of non-recoverable errors from the `Cause`. */ export declare const defects: (cause: Cause) => ReadonlyArray; /** * Produces a list of all recoverable errors `E` in the `Cause`. */ export declare const failures: (cause: Cause) => readonly E[]; /** * Returns a set of interruptors, fibers that interrupted the fiber described * by this `Cause`. */ export declare const interruptors: (cause: Cause) => ReadonlySet; /** * Determines if the `Cause` contains only interruptions and not any `Die` or * `Fail` causes. */ export declare const interruptedOnly: (cause: Cause) => boolean; /** * @internal */ export declare const stripFailuresSafe: (cause: Cause) => Sy.IO>; /** * Discards all typed failures kept on this `Cause`. */ export declare const stripFailures: (cause: Cause) => Cause; /** * @internal */ export declare const stripInterruptsSafe: (cause: Cause) => Sy.IO>; /** * Discards all interrupts kept on this `Cause`. */ export declare const stripInterrupts: (cause: Cause) => Cause; /** * @internal */ export declare const keepDefectsSafe: (cause: Cause) => Sy.IO>>; /** * Remove all `Fail` and `Interrupt` nodes from this `Cause`, * return only `Die` cause/finalizer defects. */ export declare const keepDefects: (cause: Cause) => O.Option>; export declare const sequenceCauseEitherSafe: (cause: Cause>) => Sy.IO, A>>; /** * Converts the specified `Cause>` to an `Either, A>`. */ export declare const sequenceCauseEither: (cause: Cause>) => E.Either, A>; export declare const sequenceCauseOptionSafe: (cause: Cause>) => Sy.IO>>; /** * Converts the specified `Cause>` to an `Option>`. */ export declare const sequenceCauseOption: (cause: Cause>) => O.Option>; /** * Retrieve the first checked error on the `Left` if available, * if there are no checked errors return the rest of the `Cause` * that is known to contain only `Die` or `Interrupt` causes. * */ export declare const failureOrCause: (cause: Cause) => E.Either>; /** * Squashes a `Cause` down to a single `Throwable`, chosen to be the * "most important" `Throwable`. */ export declare const squash: (f: (e: E) => unknown) => (cause: Cause) => unknown; //# sourceMappingURL=combinators.d.ts.map