/** * Maps over the cause type. * * @tsplus static effect/core/io/Exit.Aspects mapErrorCause * @tsplus pipeable effect/core/io/Exit mapErrorCause */ export function mapErrorCause(f: (cause: Cause) => Cause) { return (self: Exit): Exit => { switch (self._tag) { case "Failure": return Exit.failCause(f(self.cause)) case "Success": return self } } }