diff --git a/CHANGELOG.md b/CHANGELOG.md index 0baa96fa5..5b64c1e75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Bug Fixes 1. [#567](https://github.com/influxdata/influxdb-client-js/pull/567): Repair generated API documentation so that links between packages are rendered. +1. [#570](https://github.com/influxdata/influxdb-client-js/pull/570): Rename Headers to HttpHeaders to avoid clash with DOM's Headers type. ## 1.29.0 [2022-08-25] diff --git a/packages/core/src/results/CommunicationObserver.ts b/packages/core/src/results/CommunicationObserver.ts index 4908f014f..ff3ee14d3 100644 --- a/packages/core/src/results/CommunicationObserver.ts +++ b/packages/core/src/results/CommunicationObserver.ts @@ -2,14 +2,18 @@ import {Cancellable} from './Cancellable' /** * Type of HTTP headers. */ -export type Headers = {[header: string]: string | string[] | undefined} +export type HttpHeaders = {[header: string]: string | string[] | undefined} +export {HttpHeaders as Headers} /** * Informs about a start of response processing. * @param headers - response HTTP headers * @param statusCode - response status code */ -export type ResponseStartedFn = (headers: Headers, statusCode?: number) => void +export type ResponseStartedFn = ( + headers: HttpHeaders, + statusCode?: number +) => void /** * Observes communication with the server. diff --git a/scripts/fix-extracted-api-files.js b/scripts/fix-extracted-api-files.js index ad1d65f28..e76fabf32 100644 --- a/scripts/fix-extracted-api-files.js +++ b/scripts/fix-extracted-api-files.js @@ -15,8 +15,6 @@ const mappedReferences = { // defect in api-extractor naming https://github.com/microsoft/rushstack/issues/3629 '@influxdata/influxdb-client!FLUX_VALUE': '@influxdata/influxdb-client!FLUX_VALUE:var', - '@influxdata/influxdb-client!Headers:type': - '@influxdata/influxdb-client!Headers_2:type', } const markdownLinkRE = /\[([^\]]*)\]\(([^)]*)\)/g