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