diff --git a/CHANGELOG.md b/CHANGELOG.md index 829147aa..c2d7247c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ project adheres to [Semantic Versioning](http://semver.org/). - remove unnecessary loop from `osMemoryHeapLinux` - Improve performance of `hashObject` by using pre-sorted array of label names +- Fix type of `collectDefaultMetrics.metricsList` ### Added diff --git a/index.d.ts b/index.d.ts index fefe0a36..5824a2f8 100644 --- a/index.d.ts +++ b/index.d.ts @@ -750,20 +750,17 @@ export interface DefaultMetricsCollectorConfiguration< labels?: Object; } -/** - * Configure default metrics - * @param config Configuration object for default metrics collector - */ -export function collectDefaultMetrics( - config?: DefaultMetricsCollectorConfiguration, -): void; - -export interface defaultMetrics { +export const collectDefaultMetrics: { /** - * All available default metrics + * Configure default metrics + * @param config Configuration object for default metrics collector */ + ( + config?: DefaultMetricsCollectorConfiguration, + ): void; + /** All available default metrics */ metricsList: string[]; -} +}; /** * Validate a metric name