/** * Recovers from some or all of the defects with provided partial 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 catchSomeDefect * @tsplus pipeable effect/core/io/Effect catchSomeDefect */ export function catchSomeDefect(pf: (_: unknown) => Maybe>) { return (self: Effect): Effect => self .unrefineWith(pf, Effect.fail) .catchAll((s): Effect => s) }