Use string index notation instead of as any

This commit is contained in:
Robert
2024-02-08 11:42:03 +00:00
parent c906e76214
commit bfe78eba9a

View File

@@ -128,7 +128,8 @@ export class ExtensionTelemetryListener
);
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) {
// add a telemetry processor to delete unwanted properties
client.addTelemetryProcessor((envelope: any) => {