import { Effect } from "@effect/core/io/Effect/definition";
import { LazyArg } from "@tsplus/stdlib/data/Function";
/**
 * Returns an effect that, if this effect _starts_ execution, then the
 * specified `finalizer` is guaranteed to begin execution, whether this effect
 * succeeds, fails, or is interrupted.
 *
 * For use cases that need access to the effect's result, see `onExit`.
 *
 * Finalizers offer very powerful guarantees, but they are low-level, and
 * should generally not be used for releasing resources. For higher-level
 * logic built on `ensuring`, see `acquireReleaseWith`.
 * @tsplus fluent ets/Effect ensuring
 * @tsplus location "@effect/core/io/Effect/operations/ensuring"
 */
export declare function ensuring_<R, E, A, R1, X>(self: Effect<R, E, A>, finalizer: LazyArg<Effect<R1, never, X>>, __tsplusTrace?: string): Effect<R | R1, E, A>;
/**
 * Returns an effect that, if this effect _starts_ execution, then the
 * specified `finalizer` is guaranteed to begin execution, whether this effect
 * succeeds, fails, or is interrupted.
 *
 * For use cases that need access to the effect's result, see `onExit`.
 *
 * Finalizers offer very powerful guarantees, but they are low-level, and
 * should generally not be used for releasing resources. For higher-level
 * logic built on `ensuring`, see `acquireReleaseWith`.
 * @tsplus static ets/Effect/Aspects ensuring
 * @tsplus pipeable ets/Effect ensuring
 * @tsplus location "@effect/core/io/Effect/operations/ensuring"
 */
export declare const ensuring: <R1, X>(finalizer: import("@tsplus/stdlib/data/Function").LazyArg<import("../definition").Effect<R1, never, X>>, __tsplusTrace?: string) => <R, E, A>(self: import("../definition").Effect<R, E, A>) => import("../definition").Effect<R | R1, E, A>;
//# sourceMappingURL=ensuring.d.ts.map