Skip to content

Commit

Permalink
[main] [Possible Break] Removed Tags[] from ITelemetryItem as this wa…
Browse files Browse the repository at this point in the history
…s breaking later versions of TypeScript by using the intersection type instead of union type for tags property #2258 (#2269)
  • Loading branch information
siyuniu-ms committed Feb 12, 2024
1 parent 150f931 commit b5b9eea
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion AISKU/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ interface ITelemetryItem {
/**
* Part A custom extensions
*/
tags?: Tags[];
tags?: Tags; // Tags[] is deprecated since 4.1.0

/**
* Telemetry type used for part B
Expand Down
21 changes: 21 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

> Note: ES3/IE8 compatibility will be removed in the future v3.x.x releases (scheduled for mid-late 2022), so if you need to retain ES3 compatibility you will need to remain on the 2.x.x versions of the SDK or your runtime will need install polyfill's to your ES3 environment before loading / initializing the SDK.
## 4.0.1 (Feb 12nd, 2024)

### Potential break change

This release contains a potential break change with 'tags' type [change](https://github.com/microsoft/ApplicationInsights-JS/pull/2269)

#### Old
```ts
tags?: Tags & Tags[];
```
#### New
```ts
tags?: Tags;

```

### Changelog




## 3.0.7 (Dec 14th, 2023)

### Changelog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface ITelemetryItem {
/**
* System context property extensions that are not global (not in ctx)
*/
tags?: Tags & Tags[]; // Tags[] will be deprecated.
tags?: Tags; // Tags[] is deprecated since 4.1.0

/**
* Custom data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function getSdkLoaderScript(config: SdkLoaderConfig) {
snippet = webSnippetCs.replace("YOUR_CONNECTION_STRING", config.connectionString);
} else if (config && config.instrumentationKey) {
snippet = webSnippet.replace("InstrumentationKey=INSTRUMENTATION_KEY", config.instrumentationKey);
}
}
return snippet;
}

Expand Down

0 comments on commit b5b9eea

Please sign in to comment.