/** * Unwraps the optional error, defaulting to the provided value. * * @tsplus static effect/core/stm/STM.Aspects flattenErrorMaybe * @tsplus pipeable effect/core/stm/STM flattenErrorMaybe */ export function flattenErrorMaybe(def: E2) { return (self: STM, A>): STM => self.mapError((option) => option.fold(def, identity)) }