/** * Returns a new metric that is powered by this one, but which accepts updates * of the specified new type, which must be transformable to the input type of * this metric. * * @tsplus static effect/core/io/Metrics/Metric.Aspects contramap * @tsplus pipeable effect/core/io/Metrics/Metric contramap */ export function contramap(f: (input: In2) => In) { return (self: Metric): Metric => Metric( self.keyType, (input, extraTags) => self.unsafeUpdate(f(input), extraTags), self.unsafeValue ) }