/** * 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 effect/core/io/Metrics/Metric.Aspects trackSuccessWith * @tsplus pipeable effect/core/io/Metrics/Metric trackSuccessWith */ export function trackSuccessWith(f: (value: In2) => In) { return ( self: Metric ): (effect: Effect) => Effect => { const updater = (value: In2): Effect => self.update(f(value)) return (effect) => effect.tap(updater) } }