@@ -20,13 +20,13 @@ export interface MetricOptions {
20
20
* A function that returns a tracked metric which may be expensive
21
21
* to calculate so it is only invoked when metrics are being scraped
22
22
*/
23
- export type CalculateMetric < T = number | bigint > = ( ( ) => T ) | ( ( ) => Promise < T > )
23
+ export type CalculateMetric < T = number > = ( ( ) => T ) | ( ( ) => Promise < T > )
24
24
25
25
/**
26
26
* Create tracked metrics that are expensive to calculate by passing
27
27
* a function that is only invoked when metrics are being scraped
28
28
*/
29
- export interface CalculatedMetricOptions < T = number | bigint > extends MetricOptions {
29
+ export interface CalculatedMetricOptions < T = number > extends MetricOptions {
30
30
/**
31
31
* An optional function invoked to calculate the component metric instead of
32
32
* using `.update`, `.increment`, and `.decrement`
@@ -48,17 +48,17 @@ export interface Metric {
48
48
/**
49
49
* Update the stored metric to the passed value
50
50
*/
51
- update : ( value : number | bigint ) => void
51
+ update : ( value : number ) => void
52
52
53
53
/**
54
54
* Increment the metric by the passed value or 1
55
55
*/
56
- increment : ( value ?: number | bigint ) => void
56
+ increment : ( value ?: number ) => void
57
57
58
58
/**
59
59
* Decrement the metric by the passed value or 1
60
60
*/
61
- decrement : ( value ?: number | bigint ) => void
61
+ decrement : ( value ?: number ) => void
62
62
63
63
/**
64
64
* Reset this metric to its default value
@@ -80,19 +80,19 @@ export interface MetricGroup {
80
80
/**
81
81
* Update the stored metric group to the passed value
82
82
*/
83
- update : ( values : Record < string , number | bigint > ) => void
83
+ update : ( values : Record < string , number > ) => void
84
84
85
85
/**
86
86
* Increment the metric group keys by the passed number or
87
87
* any non-numeric value to increment by 1
88
88
*/
89
- increment : ( values : Record < string , number | bigint | unknown > ) => void
89
+ increment : ( values : Record < string , number | unknown > ) => void
90
90
91
91
/**
92
92
* Decrement the metric group keys by the passed number or
93
93
* any non-numeric value to decrement by 1
94
94
*/
95
- decrement : ( values : Record < string , number | bigint | unknown > ) => void
95
+ decrement : ( values : Record < string , number | unknown > ) => void
96
96
97
97
/**
98
98
* Reset the passed key in this metric group to its default value
@@ -115,7 +115,7 @@ export interface Counter {
115
115
/**
116
116
* Increment the metric by the passed value or 1
117
117
*/
118
- increment : ( value ?: number | bigint ) => void
118
+ increment : ( value ?: number ) => void
119
119
120
120
/**
121
121
* Reset this metric to its default value
@@ -133,7 +133,7 @@ export interface CounterGroup {
133
133
* Increment the metric group keys by the passed number or
134
134
* any non-numeric value to increment by 1
135
135
*/
136
- increment : ( values : Record < string , number | bigint | unknown > ) => void
136
+ increment : ( values : Record < string , number | unknown > ) => void
137
137
138
138
/**
139
139
* Reset the passed key in this metric group to its default value
@@ -170,7 +170,7 @@ export interface Metrics {
170
170
* groups of related metrics that will be updated with by calling `.update`,
171
171
* `.increment` and/or `.decrement` methods on the returned metric group object
172
172
*/
173
- registerMetricGroup : ( ( name : string , options ?: MetricOptions ) => MetricGroup ) & ( ( name : string , options : CalculatedMetricOptions < Record < string , number | bigint > > ) => void )
173
+ registerMetricGroup : ( ( name : string , options ?: MetricOptions ) => MetricGroup ) & ( ( name : string , options : CalculatedMetricOptions < Record < string , number > > ) => void )
174
174
175
175
/**
176
176
* Register an arbitrary counter. Call this to set help/labels for counters
@@ -183,5 +183,5 @@ export interface Metrics {
183
183
* groups of related counters that will be updated with by calling the `.increment`
184
184
* method on the returned counter group object
185
185
*/
186
- registerCounterGroup : ( ( name : string , options ?: MetricOptions ) => CounterGroup ) & ( ( name : string , options : CalculatedMetricOptions < Record < string , number | bigint > > ) => void )
186
+ registerCounterGroup : ( ( name : string , options ?: MetricOptions ) => CounterGroup ) & ( ( name : string , options : CalculatedMetricOptions < Record < string , number > > ) => void )
187
187
}
0 commit comments