/** * @since 1.0.0 */ import type * as Chunk from "@effect/data/Chunk"; import type * as Duration from "@effect/data/Duration"; import type * as Equal from "@effect/data/Equal"; import type { Pipeable } from "@effect/data/Pipeable"; import type * as MetricBoundaries from "@effect/io/MetricBoundaries"; import type * as MetricState from "@effect/io/MetricState"; /** * @since 1.0.0 * @category symbols */ export declare const MetricKeyTypeTypeId: unique symbol; /** * @since 1.0.0 * @category symbols */ export type MetricKeyTypeTypeId = typeof MetricKeyTypeTypeId; /** * @since 1.0.0 * @category symbols */ export declare const CounterKeyTypeTypeId: unique symbol; /** * @since 1.0.0 * @category symbols */ export type CounterKeyTypeTypeId = typeof CounterKeyTypeTypeId; /** * @since 1.0.0 * @category symbols */ export declare const FrequencyKeyTypeTypeId: unique symbol; /** * @since 1.0.0 * @category symbols */ export type FrequencyKeyTypeTypeId = typeof FrequencyKeyTypeTypeId; /** * @since 1.0.0 * @category symbols */ export declare const GaugeKeyTypeTypeId: unique symbol; /** * @since 1.0.0 * @category symbols */ export type GaugeKeyTypeTypeId = typeof GaugeKeyTypeTypeId; /** * @since 1.0.0 * @category symbols */ export declare const HistogramKeyTypeTypeId: unique symbol; /** * @since 1.0.0 * @category symbols */ export type HistogramKeyTypeTypeId = typeof HistogramKeyTypeTypeId; /** * @since 1.0.0 * @category symbols */ export declare const SummaryKeyTypeTypeId: unique symbol; /** * @since 1.0.0 * @category symbols */ export type SummaryKeyTypeTypeId = typeof SummaryKeyTypeTypeId; /** * @since 1.0.0 * @category modelz */ export interface MetricKeyType extends MetricKeyType.Variance, Equal.Equal, Pipeable { } /** * @since 1.0.0 */ export declare namespace MetricKeyType { /** * @since 1.0.0 * @category models */ type Untyped = MetricKeyType; /** * @since 1.0.0 * @category models */ type Counter = MetricKeyType & { readonly [CounterKeyTypeTypeId]: CounterKeyTypeTypeId; }; /** * @since 1.0.0 * @category models */ type Frequency = MetricKeyType & { readonly [FrequencyKeyTypeTypeId]: FrequencyKeyTypeTypeId; }; /** * @since 1.0.0 * @category models */ type Gauge = MetricKeyType & { readonly [GaugeKeyTypeTypeId]: GaugeKeyTypeTypeId; }; /** * @since 1.0.0 * @category models */ type Histogram = MetricKeyType & { readonly [HistogramKeyTypeTypeId]: HistogramKeyTypeTypeId; readonly boundaries: MetricBoundaries.MetricBoundaries; }; /** * @since 1.0.0 * @category models */ type Summary = MetricKeyType & { readonly [SummaryKeyTypeTypeId]: SummaryKeyTypeTypeId; readonly maxAge: Duration.Duration; readonly maxSize: number; readonly error: number; readonly quantiles: Chunk.Chunk; }; /** * @since 1.0.0 * @category models */ interface Variance { readonly [MetricKeyTypeTypeId]: { readonly _In: (_: In) => void; readonly _Out: (_: never) => Out; }; } /** * @since 1.0.0 * @category models */ type InType> = [Type] extends [ { readonly [MetricKeyTypeTypeId]: { readonly _In: (_: infer In) => void; }; } ] ? In : never; /** * @since 1.0.0 * @category models */ type OutType> = [Type] extends [ { readonly [MetricKeyTypeTypeId]: { readonly _Out: (_: never) => infer Out; }; } ] ? Out : never; } /** * @since 1.0.0 * @category constructors */ export declare const counter: MetricKeyType.Counter; /** * @since 1.0.0 * @category constructors */ export declare const frequency: MetricKeyType.Frequency; /** * @since 1.0.0 * @category constructors */ export declare const gauge: MetricKeyType.Gauge; /** * @since 1.0.0 * @category constructors */ export declare const histogram: (boundaries: MetricBoundaries.MetricBoundaries) => MetricKeyType.Histogram; /** * @since 1.0.0 * @category constructors */ export declare const summary: (options: { readonly maxAge: Duration.DurationInput; readonly maxSize: number; readonly error: number; readonly quantiles: Chunk.Chunk; }) => MetricKeyType.Summary; /** * @since 1.0.0 * @category refinements */ export declare const isMetricKeyType: (u: unknown) => u is MetricKeyType; /** * @since 1.0.0 * @category refinements */ export declare const isCounterKey: (u: unknown) => u is MetricKeyType.Counter; /** * @since 1.0.0 * @category refinements */ export declare const isFrequencyKey: (u: unknown) => u is MetricKeyType.Frequency; /** * @since 1.0.0 * @category refinements */ export declare const isGaugeKey: (u: unknown) => u is MetricKeyType.Gauge; /** * @since 1.0.0 * @category refinements */ export declare const isHistogramKey: (u: unknown) => u is MetricKeyType.Histogram; /** * @since 1.0.0 * @category refinements */ export declare const isSummaryKey: (u: unknown) => u is MetricKeyType.Summary; //# sourceMappingURL=MetricKeyType.d.ts.map