From 3ad3f3f44b53823670178a9717353df9a082caec Mon Sep 17 00:00:00 2001 From: Thierry Lamarre Date: Sat, 13 Nov 2021 03:47:22 +0100 Subject: [PATCH] fix getMetricsAsArray type (#477) * fix getMetricsAsArray type * add changelog for getMetricsAsArray type fix * move changelog to correct section Co-authored-by: thierry --- CHANGELOG.md | 2 ++ index.d.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b0418d5..bab89211 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ project adheres to [Semantic Versioning](http://semver.org/). ### Changed +- types: fixed type for `registry.getMetricsAsArray()` + - changed: typedef for pushgateway to reflect js implementation. Pushgateway's typedef were missing promise return type. That was diff --git a/index.d.ts b/index.d.ts index 7f380e64..5b6f313e 100644 --- a/index.d.ts +++ b/index.d.ts @@ -34,7 +34,7 @@ export class Registry { /** * Get all metrics as objects */ - getMetricsAsArray(): Promise; + getMetricsAsArray(): metric[]; /** * Remove a single metric