prom-client icon indicating copy to clipboard operation
prom-client copied to clipboard

Fixed types

Open zigazajc007 opened this issue 9 months ago • 4 comments

Related to issue https://github.com/siimon/prom-client/issues/614

Registry<RegistryContentType = PrometheusContentType>

As PrometheusContentType is assigned to RegistryContentType, the typescript will automatically exclude OpenMetricsContentType from RegistryContentType in Registry. So to solve this issue, we can just manually tell typescript that provided value can be PrometheusContentType or OpenMetricsContentType.

zigazajc007 avatar Apr 29 '24 08:04 zigazajc007

Is this everything that is needed or do I still need to write a Changelog?

zigazajc007 avatar Apr 29 '24 10:04 zigazajc007

I messed around with the lint error in #630, and I might've accidentally fixed this? Could you check? If still broken, this needs a quick rebase 🙂

SimenB avatar Apr 29 '24 10:04 SimenB

Tried method in https://github.com/siimon/prom-client/pull/630 but it doesn't work.

image

I'm using typescript from Bun.

zigazajc007 avatar Apr 29 '24 10:04 zigazajc007

Fair - mind rebasing? 🙂

SimenB avatar Jun 22 '24 08:06 SimenB