Skip to content

Commit c171309

Browse files
committed
src: fix type of collectDefaultMetrics.metricsList
Fixes #583
1 parent 2ffd316 commit c171309

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
1313

1414
- remove unnecessary loop from `osMemoryHeapLinux`
1515
- Improve performance of `hashObject` by using pre-sorted array of label names
16+
- Fix type of `collectDefaultMetrics.metricsList`
1617

1718
### Added
1819

index.d.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -750,20 +750,17 @@ export interface DefaultMetricsCollectorConfiguration<
750750
labels?: Object;
751751
}
752752

753-
/**
754-
* Configure default metrics
755-
* @param config Configuration object for default metrics collector
756-
*/
757-
export function collectDefaultMetrics<T extends RegistryContentType>(
758-
config?: DefaultMetricsCollectorConfiguration<T>,
759-
): void;
760-
761-
export interface defaultMetrics {
753+
export const collectDefaultMetrics: {
762754
/**
763-
* All available default metrics
755+
* Configure default metrics
756+
* @param config Configuration object for default metrics collector
764757
*/
758+
<T extends RegistryContentType>(
759+
config?: DefaultMetricsCollectorConfiguration<T>,
760+
): void;
761+
/** All available default metrics */
765762
metricsList: string[];
766-
}
763+
};
767764

768765
/**
769766
* Validate a metric name

0 commit comments

Comments
 (0)