Skip to content

Commit

Permalink
fix: add missing Registry types
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Apr 16, 2024
1 parent 99b25a4 commit b012bcc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ project adheres to [Semantic Versioning](http://semver.org/).

### Changed

- Enable `bun.js` by catching `NotImplemented` error (Fixes [#570](https://github.com/siimon/prom-client/issues/570))
- Add `Registry.PROMETHEUS_CONTENT_TYPE` and `Registry.OPENMETRICS_CONTENT_TYPE` constants to the TypeScript types

### Added

- Enable `bun.js` by catching `NotImplemented` error (Fixes [#570](https://github.com/siimon/prom-client/issues/570))

[unreleased]: https://github.com/siimon/prom-client/compare/v15.1.0...HEAD

## [15.1.1] - 2024-03-26
Expand Down
14 changes: 12 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ export class Registry<RegistryContentType = PrometheusContentType> {
* @param registers The registers you want to merge together
*/
static merge(registers: Registry[]): Registry;

/**
* HTTP Prometheus Content-Type for metrics response headers.
*/
static PROMETHEUS_CONTENT_TYPE: PrometheusContentType;

/**
* HTTP OpenMetrics Content-Type for metrics response headers.
*/
static OPENMETRICS_CONTENT_TYPE: OpenMetricsContentType;
}
export type Collector = () => void;

Expand All @@ -104,8 +114,8 @@ export type Collector = () => void;
export const register: Registry;

/**
* HTTP Content-Type for metrics response headers, defaults to Prometheus text
* format.
* HTTP Content-Type for metrics response headers for the default registry,
* defaults to Prometheus text format.
*/
export const contentType: RegistryContentType;

Expand Down

0 comments on commit b012bcc

Please sign in to comment.