/** * Acts on the children of this fiber, guaranteeing the specified callback * will be invoked, whether or not this effect succeeds. * * @tsplus static effect/core/io/Effect.Aspects ensuringChildren * @tsplus pipeable effect/core/io/Effect ensuringChildren */ export function ensuringChildren( children: (_: Chunk>) => Effect ) { return (self: Effect): Effect => Supervisor.track.flatMap((supervisor) => self.supervised(supervisor).ensuring(supervisor.value.flatMap(children)) ) }