import { Channel } from "@effect/core/stream/Channel/definition/base";
import { Exit } from "@effect/core/io/Exit/definition";
import { Effect } from "@effect/core/io/Effect/definition";
/**
 * Returns a new channel with an attached finalizer. The finalizer is
 * guaranteed to be executed so long as the channel begins execution (and
 * regardless of whether or not it completes).
 * @tsplus fluent ets/Channel ensuringWith
 * @tsplus location "@effect/core/stream/Channel/operations/ensuringWith"
 */
export declare function ensuringWith_<Env, Env2, InErr, InElem, InDone, OutErr, OutElem, OutDone>(channel: Channel<Env, InErr, InElem, InDone, OutErr, OutElem, OutDone>, finalizer: (e: Exit<OutErr, OutDone>) => Effect<Env2, never, unknown>): Channel<Env | Env2, InErr, InElem, InDone, OutErr, OutElem, OutDone>;
/**
 * Returns a new channel with an attached finalizer. The finalizer is
 * guaranteed to be executed so long as the channel begins execution (and
 * regardless of whether or not it completes).
 * @tsplus static ets/Channel/Aspects ensuringWith
 * @tsplus pipeable ets/Channel ensuringWith
 * @tsplus location "@effect/core/stream/Channel/operations/ensuringWith"
 */
export declare const ensuringWith: <Env2, OutErr, OutDone>(finalizer: (e: import("../../../io/Exit").Exit<OutErr, OutDone>) => import("../../../io/Effect").Effect<Env2, never, unknown>) => <Env_1, InErr, InElem, InDone, OutElem>(channel: import("../definition").Channel<Env_1, InErr, InElem, InDone, OutErr, OutElem, OutDone>) => import("../definition").Channel<Env_1 | Env2, InErr, InElem, InDone, OutErr, OutElem, OutDone>;
//# sourceMappingURL=ensuringWith.d.ts.map