/** * Recovers from all defects with provided function. * * **WARNING**: There is no sensible way to recover from defects. This * method should be used only at the boundary between Effect and an external * system, to transmit information on a defect for diagnostic or explanatory * purposes. * * @tsplus static effect/core/io/Effect.Aspects catchAllDefect * @tsplus pipeable effect/core/io/Effect catchAllDefect */ export function catchAllDefect(f: (defect: unknown) => Effect) { return (self: Effect): Effect => self.catchSomeDefect((d) => Maybe.some(f(d))) }