UNPKG

next-actuator

Version:

A fully composable actuator implementation for Next.js projects

35 lines (34 loc) 835 B
type BaseMetric = { /** * A description of the metric */ description: string; /** * The unit that the metric is represented in */ baseUnit: string; }; type DimensionalMetric = BaseMetric & { /** * A collection of dimensions representing the aggregated metric value */ dimensions: Record<string, { /** * The value of the dimension */ value: () => Promise<number>; /** * A description of the dimension */ description: string; }>; }; type SingularMetric = BaseMetric & { /** * The value of a metric */ value: () => Promise<number>; }; export type Metric = DimensionalMetric | SingularMetric; export declare const isDimensionalMetric: (metric: Metric) => metric is DimensionalMetric; export {};