const fileName_1 = "(@effect/core) _src/io/Metrics/operations/trackSuccessWith.ts";
import * as tsplus_module_1 from "@effect/core/io/Metrics/operations/update";
import * as tsplus_module_2 from "@effect/core/io/Effect/operations/tap";
/**
 * Returns an aspect that will update this metric with the result of applying
 * the specified function to the success value of the effects that the aspect is
 * applied to.
 *
 * @tsplus fluent ets/Metrics/Metric trackSuccessWith
 */

export function trackSuccessWith_(self, f) {
  const updater = value => tsplus_module_1.update_(self, () => f(value), fileName_1 + ":9:74");

  return (effect, __tsplusTrace) => tsplus_module_2.tap_(effect, updater, fileName_1 + ":10:111");
}
/**
 * Returns an aspect that will update this metric with the result of applying
 * the specified function to the success value of the effects that the aspect is
 * applied to.
 *
 * @tsplus static ets/Metrics/Metric/Aspects trackSuccessWith
 */

export const trackSuccessWith = f => self => trackSuccessWith_(self, f);
//# sourceMappingURL=trackSuccessWith.mjs.map