Use string index notation instead of as any

This commit is contained in:
Robert 2024-02-08 11:42:03 +00:00
Родитель c906e76214
Коммит bfe78eba9a
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -128,7 +128,8 @@ export class ExtensionTelemetryListener
); );
this.push(this.reporter); this.push(this.reporter);
const client = (this.reporter as any).appInsightsClient as TelemetryClient; // The appInsightsClient field is private but we want to access it anyway
const client = this.reporter["appInsightsClient"] as TelemetryClient;
if (client) { if (client) {
// add a telemetry processor to delete unwanted properties // add a telemetry processor to delete unwanted properties
client.addTelemetryProcessor((envelope: any) => { client.addTelemetryProcessor((envelope: any) => {