From e30ecd1c86615b93254626a8c8570c084d63cb8d Mon Sep 17 00:00:00 2001 From: Asad Usmonov Date: Thu, 31 Jul 2025 22:18:28 +0500 Subject: [PATCH 1/2] feat: add constructor with content type param to Registry class in TypeScript definitions --- index.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 8cf983a7..617a1524 100644 --- a/index.d.ts +++ b/index.d.ts @@ -22,8 +22,13 @@ export type RegistryContentType = * Container for all registered metrics */ export class Registry< - BoundRegistryContentType extends RegistryContentType = PrometheusContentType, + BoundRegistryContentType extends RegistryContentType = RegistryContentType, > { + /** + * @param regContentType The content type of the registry + */ + constructor(regContentType?: RegistryContentType) + /** * Get string representation for all metrics */ From c2597c95a0ba41796d5445a5667608e1e713aa1d Mon Sep 17 00:00:00 2001 From: Jason Marshall Date: Fri, 3 Jul 2026 12:47:48 -0700 Subject: [PATCH 2/2] Fix formatting of constructor in index.d.ts --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 617a1524..01660d7c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -27,7 +27,7 @@ export class Registry< /** * @param regContentType The content type of the registry */ - constructor(regContentType?: RegistryContentType) + constructor(regContentType?: RegistryContentType); /** * Get string representation for all metrics