import * as tsplus_module_1 from "@effect/core/io/Effect/operations/acquireReleaseExit";
/**
 * A more powerful variant of `withFinalizer` that allows the finalizer to
 * depend on the `Exit` value that the scope is closed with.
 *
 * @tsplus fluent ets/Effect withFinalizerExit
 */

export function withFinalizerExit_(self, finalizer, __tsplusTrace) {
  return tsplus_module_1.acquireReleaseExit(() => self, (_, exit) => finalizer(exit), __tsplusTrace);
}
/**
 * A more powerful variant of `withFinalizer` that allows the finalizer to
 * depend on the `Exit` value that the scope is closed with.
 *
 * @tsplus static ets/Effect/Aspects withFinalizerExit
 */

export const withFinalizerExit = (finalizer, __tsplusTrace) => self => withFinalizerExit_(self, finalizer, __tsplusTrace);
//# sourceMappingURL=withFinalizerExit.mjs.map