Skip to content

Commit 0e245a6

Browse files
committed
fix: add registry field to types and fix client from any
1 parent 87e6540 commit 0e245a6

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"eslint-plugin-prettier": "3.4.1",
5151
"lint-staged": "10.5.4",
5252
"prettier": "2.8.8",
53-
"prom-client": "13.2.0",
53+
"prom-client": "14.2.0",
5454
"semantic-release": "22.0.7",
5555
"tap": "16.3.8"
5656
}

prometheus-consumer.d.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Writable } from 'readable-stream';
22
import { AbstractLogger } from 'abslog';
3-
import PrometheusClient, { Registry } from 'prom-client';
3+
import * as PrometheusClient from 'prom-client';
44

55
declare class PrometheusConsumer extends Writable {
66
constructor(options: PrometheusConsumer.PrometheusConsumerOptions);
@@ -9,13 +9,14 @@ declare class PrometheusConsumer extends Writable {
99
metric: string,
1010
config: PrometheusConsumer.PrometheusConsumerOverrideConfig,
1111
): void;
12-
metrics(): ReturnType<Registry['metrics']>;
13-
contentType(): Registry['contentType'];
12+
readonly registry: PrometheusClient.Registry;
13+
metrics(): ReturnType<PrometheusClient.Registry['metrics']>;
14+
contentType(): PrometheusClient.Registry['contentType'];
1415
}
1516

1617
declare namespace PrometheusConsumer {
1718
export type PrometheusConsumerOptions = {
18-
client: PrometheusClient;
19+
client: typeof PrometheusClient;
1920
logger?: AbstractLogger;
2021
bucketStepFactor?: number;
2122
bucketStepCount?: number;

0 commit comments

Comments
 (0)