From d36dc3b4f52d3eda55b713b86ace90b52cbea172 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 29 Apr 2024 12:14:22 +0200 Subject: [PATCH] chore: fix lint errors in TS file --- .eslintrc | 2 ++ index.d.ts | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.eslintrc b/.eslintrc index 7adb806a..14fb0748 100644 --- a/.eslintrc +++ b/.eslintrc @@ -76,6 +76,8 @@ "parser": "@typescript-eslint/parser", "plugins": ["@typescript-eslint"], "rules": { + "no-shadow": "off", + "@typescript-eslint/no-shadow": "warn", "node/no-unsupported-features/es-syntax": "off" } }, diff --git a/index.d.ts b/index.d.ts index 7b3307f7..d7fb1c97 100644 --- a/index.d.ts +++ b/index.d.ts @@ -21,7 +21,7 @@ export type RegistryContentType = /** * Container for all registered metrics */ -export class Registry { +export class Registry { /** * Get string representation for all metrics */ @@ -81,14 +81,14 @@ export class Registry { /** * Gets the Content-Type of the metrics for use in the response headers. */ - readonly contentType: RegistryContentType; + readonly contentType: BoundRegistryContentType; /** * Set the content type of a registry. Used to change between Prometheus and * OpenMetrics versions. * @param contentType The type of the registry */ - setContentType(contentType: RegistryContentType): void; + setContentType(contentType: BoundRegistryContentType): void; /** * Merge registers