/** * Returns an aspect that will update this metric with the result of applying * the specified function to the error value of the effects that the aspect is * applied to. * * @tsplus static effect/core/io/Metrics/Metric.Aspects trackErrorWith * @tsplus pipeable effect/core/io/Metrics/Metric trackErrorWith */ export function trackErrorWith(f: (error: In2) => In) { return ( self: Metric ): (effect: Effect) => Effect => { const updater = (error: In2): Effect => self.update(f(error)) return (effect) => effect.tapError(updater) } }