import * as tsplus_module_1 from "@effect/core/io/Effect/operations/withFinalizerExit";
/**
 * Treats this effect as the acquisition of a resource and adds the
 * specified finalizer to the current scope. This effect will be run
 * uninterruptibly and the finalizer will be run when the scope is closed.
 *
 * @tsplus fluent ets/Effect withFinalizer
 */

export function withFinalizer_(self, finalizer, __tsplusTrace) {
  return tsplus_module_1.withFinalizerExit_(self, finalizer, __tsplusTrace);
}
/**
 * Treats this effect as the acquisition of a resource and adds the
 * specified finalizer to the current scope. This effect will be run
 * uninterruptibly and the finalizer will be run when the scope is closed.
 *
 * @tsplus static ets/Effect/Aspects withFinalizer
 */

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