MetricKeyType.ts overview
Since v2.0.0
Exports Grouped by Category
- constructors
- modelz
- refinements
- symbols
- CounterKeyTypeTypeId
- CounterKeyTypeTypeId (type alias)
- FrequencyKeyTypeTypeId
- FrequencyKeyTypeTypeId (type alias)
- GaugeKeyTypeTypeId
- GaugeKeyTypeTypeId (type alias)
- HistogramKeyTypeTypeId
- HistogramKeyTypeTypeId (type alias)
- MetricKeyTypeTypeId
- MetricKeyTypeTypeId (type alias)
- SummaryKeyTypeTypeId
- SummaryKeyTypeTypeId (type alias)
- utils
constructors
counter
Signature
declare const counter: <A extends number | bigint>() => MetricKeyType.Counter<A>
Since v2.0.0
frequency
Signature
declare const frequency: (
options?: { readonly preregisteredWords?: ReadonlyArray<string> | undefined } | undefined
) => MetricKeyType.Frequency
Since v2.0.0
gauge
Signature
declare const gauge: <A extends number | bigint>() => MetricKeyType.Gauge<A>
Since v2.0.0
histogram
Signature
declare const histogram: (boundaries: MetricBoundaries.MetricBoundaries) => MetricKeyType.Histogram
Since v2.0.0
summary
Signature
declare const summary: (options: {
readonly maxAge: Duration.DurationInput
readonly maxSize: number
readonly error: number
readonly quantiles: ReadonlyArray<number>
}) => MetricKeyType.Summary
Since v2.0.0
modelz
MetricKeyType (interface)
Signature
export interface MetricKeyType<in In, out Out> extends MetricKeyType.Variance<In, Out>, Equal.Equal, Pipeable {}
Since v2.0.0
refinements
isCounterKey
Signature
declare const isCounterKey: (u: unknown) => u is MetricKeyType.Counter<number | bigint>
Since v2.0.0
isFrequencyKey
Signature
declare const isFrequencyKey: (u: unknown) => u is MetricKeyType.Frequency
Since v2.0.0
isGaugeKey
Signature
declare const isGaugeKey: (u: unknown) => u is MetricKeyType.Gauge<number | bigint>
Since v2.0.0
isHistogramKey
Signature
declare const isHistogramKey: (u: unknown) => u is MetricKeyType.Histogram
Since v2.0.0
isMetricKeyType
Signature
declare const isMetricKeyType: (u: unknown) => u is MetricKeyType<unknown, unknown>
Since v2.0.0
isSummaryKey
Signature
declare const isSummaryKey: (u: unknown) => u is MetricKeyType.Summary
Since v2.0.0
symbols
CounterKeyTypeTypeId
Signature
declare const CounterKeyTypeTypeId: unique symbol
Since v2.0.0
CounterKeyTypeTypeId (type alias)
Signature
type CounterKeyTypeTypeId = typeof CounterKeyTypeTypeId
Since v2.0.0
FrequencyKeyTypeTypeId
Signature
declare const FrequencyKeyTypeTypeId: unique symbol
Since v2.0.0
FrequencyKeyTypeTypeId (type alias)
Signature
type FrequencyKeyTypeTypeId = typeof FrequencyKeyTypeTypeId
Since v2.0.0
GaugeKeyTypeTypeId
Signature
declare const GaugeKeyTypeTypeId: unique symbol
Since v2.0.0
GaugeKeyTypeTypeId (type alias)
Signature
type GaugeKeyTypeTypeId = typeof GaugeKeyTypeTypeId
Since v2.0.0
HistogramKeyTypeTypeId
Signature
declare const HistogramKeyTypeTypeId: unique symbol
Since v2.0.0
HistogramKeyTypeTypeId (type alias)
Signature
type HistogramKeyTypeTypeId = typeof HistogramKeyTypeTypeId
Since v2.0.0
MetricKeyTypeTypeId
Signature
declare const MetricKeyTypeTypeId: unique symbol
Since v2.0.0
MetricKeyTypeTypeId (type alias)
Signature
type MetricKeyTypeTypeId = typeof MetricKeyTypeTypeId
Since v2.0.0
SummaryKeyTypeTypeId
Signature
declare const SummaryKeyTypeTypeId: unique symbol
Since v2.0.0
SummaryKeyTypeTypeId (type alias)
Signature
type SummaryKeyTypeTypeId = typeof SummaryKeyTypeTypeId
Since v2.0.0
utils
MetricKeyType (namespace)
Since v2.0.0
Variance (interface)
Signature
export interface Variance<in In, out Out> {
readonly [MetricKeyTypeTypeId]: {
readonly _In: Types.Contravariant<In>
readonly _Out: Types.Covariant<Out>
}
}
Since v2.0.0
Untyped (type alias)
Signature
type Untyped = MetricKeyType<any, any>
Since v2.0.0
Counter (type alias)
Signature
type Counter<A> = MetricKeyType<A, MetricState.MetricState.Counter<A>> & {
readonly [CounterKeyTypeTypeId]: CounterKeyTypeTypeId
readonly incremental: boolean
readonly bigint: boolean
}
Since v2.0.0
Frequency (type alias)
Signature
type Frequency = MetricKeyType<string, MetricState.MetricState.Frequency> & {
readonly [FrequencyKeyTypeTypeId]: FrequencyKeyTypeTypeId
readonly preregisteredWords: ReadonlyArray<string>
}
Since v2.0.0
Gauge (type alias)
Signature
type Gauge<A> = MetricKeyType<A, MetricState.MetricState.Gauge<A>> & {
readonly [GaugeKeyTypeTypeId]: GaugeKeyTypeTypeId
readonly bigint: boolean
}
Since v2.0.0
Histogram (type alias)
Signature
type Histogram = MetricKeyType<number, MetricState.MetricState.Histogram> & {
readonly [HistogramKeyTypeTypeId]: HistogramKeyTypeTypeId
readonly boundaries: MetricBoundaries.MetricBoundaries
}
Since v2.0.0
Summary (type alias)
Signature
type Summary = MetricKeyType<readonly [number, number], MetricState.MetricState.Summary> & {
readonly [SummaryKeyTypeTypeId]: SummaryKeyTypeTypeId
readonly maxAge: Duration.Duration
readonly maxSize: number
readonly error: number
readonly quantiles: ReadonlyArray<number>
}
Since v2.0.0
InType (type alias)
Signature
type InType<Type> = [Type] extends [
{
readonly [MetricKeyTypeTypeId]: {
readonly _In: (_: infer In) => void
}
}
]
? In
: never
Since v2.0.0
OutType (type alias)
Signature
type OutType<Type> = [Type] extends [
{
readonly [MetricKeyTypeTypeId]: {
readonly _Out: (_: never) => infer Out
}
}
]
? Out
: never
Since v2.0.0