/** * @since 1.0.0 */ import type { LazyArg } from "@effect/data/Function"; import type { Pipeable } from "@effect/data/Pipeable"; import type * as MetricKey from "@effect/io/MetricKey"; import type * as MetricState from "@effect/io/MetricState"; /** * @since 1.0.0 * @category symbols */ export declare const MetricHookTypeId: unique symbol; /** * @since 1.0.0 * @category symbols */ export type MetricHookTypeId = typeof MetricHookTypeId; /** * @since 1.0.0 * @category models */ export interface MetricHook extends MetricHook.Variance, Pipeable { readonly get: () => Out; readonly update: (input: In) => void; } /** * @since 1.0.0 */ export declare namespace MetricHook { /** * @since 1.0.0 * @category models */ type Root = MetricHook; /** * @since 1.0.0 * @category models */ type Untyped = MetricHook; /** * @since 1.0.0 * @category models */ type Counter = MetricHook; /** * @since 1.0.0 * @category models */ type Gauge = MetricHook; /** * @since 1.0.0 * @category models */ type Frequency = MetricHook; /** * @since 1.0.0 * @category models */ type Histogram = MetricHook; /** * @since 1.0.0 * @category models */ type Summary = MetricHook; /** * @since 1.0.0 * @category models */ interface Variance { readonly [MetricHookTypeId]: { readonly _In: (_: In) => void; readonly _Out: (_: never) => Out; }; } } /** * @since 1.0.0 * @category constructors */ export declare const make: (options: { readonly get: LazyArg; readonly update: (input: In) => void; }) => MetricHook; /** * @since 1.0.0 * @category constructors */ export declare const counter: (_key: MetricKey.MetricKey.Counter) => MetricHook.Counter; /** * @since 1.0.0 * @category constructors */ export declare const frequency: (_key: MetricKey.MetricKey.Frequency) => MetricHook.Frequency; /** * @since 1.0.0 * @category constructors */ export declare const gauge: (_key: MetricKey.MetricKey.Gauge, startAt: number) => MetricHook.Gauge; /** * @since 1.0.0 * @category constructors */ export declare const histogram: (key: MetricKey.MetricKey.Histogram) => MetricHook.Histogram; /** * @since 1.0.0 * @category constructors */ export declare const summary: (key: MetricKey.MetricKey.Summary) => MetricHook.Summary; /** * @since 1.0.0 * @category utils */ export declare const onUpdate: { (f: (input: In) => void): (self: MetricHook) => MetricHook; (self: MetricHook, f: (input: In) => void): MetricHook; }; //# sourceMappingURL=MetricHook.d.ts.map