From bfe78eba9aeda9c68a83b57e75a8b560f9e7cd06 Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 8 Feb 2024 11:42:03 +0000 Subject: [PATCH] Use string index notation instead of as any --- extensions/ql-vscode/src/common/vscode/telemetry.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/ql-vscode/src/common/vscode/telemetry.ts b/extensions/ql-vscode/src/common/vscode/telemetry.ts index ebad18a88..3ab30059b 100644 --- a/extensions/ql-vscode/src/common/vscode/telemetry.ts +++ b/extensions/ql-vscode/src/common/vscode/telemetry.ts @@ -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) => {