import * as tsplus_module_1 from "@effect/core/io/Effect/operations/tryCatch";
import * as tsplus_module_2 from "@effect/core/io/Effect/operations/flatMap";
/**
 * Returns an effect whose success is mapped by the specified side effecting
 * `f` function, translating any thrown exceptions into typed failed effects.
 *
 * @tsplus fluent ets/Effect mapTryCatch
 */

export function mapTryCatch_(self, f, onThrow, __tsplusTrace) {
  return tsplus_module_2.flatMap_(self, a => tsplus_module_1.tryCatch(() => f(a), onThrow, __tsplusTrace), __tsplusTrace);
}
/**
 * Returns an effect whose success is mapped by the specified side effecting
 * `f` function, translating any thrown exceptions into typed failed effects.
 *
 * @tsplus static ets/Effect/Aspects mapTryCatch
 */

export const mapTryCatch = (f, onThrow, __tsplusTrace) => self => mapTryCatch_(self, f, onThrow, __tsplusTrace);
//# sourceMappingURL=mapTryCatch.mjs.map