diff --git a/index.d.ts b/index.d.ts index 8c0ebb2c..ad40e625 100644 --- a/index.d.ts +++ b/index.d.ts @@ -304,7 +304,7 @@ type MetricValueWithName = MetricValue & { type LabelValues = T extends NoLabelNameType ? Partial> - : Partial>; + : Partial>; interface MetricConfiguration { name: string; diff --git a/test/typescript.ts b/test/typescript.ts index 80d899ce..2a0ff380 100644 --- a/test/typescript.ts +++ b/test/typescript.ts @@ -18,8 +18,10 @@ const registry = new Registry(); const counter = new Counter({ name: 'typescript_test_counter', help: 'TypeScript test counter', + labelNames: ['handler'], registers: [registry], }); +counter.inc({ handler: ['/a', '/b'] }); const metricsText: Promise = registry.getMetricsAsString(counter); const gatewayWithRegistry = new Pushgateway('http://127.0.0.1:9091', registry);