import { Ensuring } from "@effect/core/stream/Channel/definition/primitives" /** * 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 effect/core/stream/Channel.Aspects ensuringWith * @tsplus pipeable effect/core/stream/Channel ensuringWith */ export function ensuringWith( finalizer: (e: Exit) => Effect ) { return ( self: Channel ): Channel => new Ensuring( self, finalizer ) }