From c24888977cf7494e6183a3caf9ab041ebc2a2b09 Mon Sep 17 00:00:00 2001 From: Tiago Santos Da Silva Date: Mon, 4 Oct 2021 17:56:32 -0300 Subject: [PATCH] Typing adjustment - 1357 (#1411) * fix: typing adjustment --- webapp/src/blocks/archive.ts | 2 +- webapp/src/telemetry/telemetryClient.ts | 2 +- webapp/src/testUtils.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/src/blocks/archive.ts b/webapp/src/blocks/archive.ts index 6e2e6c921..fb1ec743f 100644 --- a/webapp/src/blocks/archive.ts +++ b/webapp/src/blocks/archive.ts @@ -9,7 +9,7 @@ interface ArchiveHeader { interface ArchiveLine { type: string, - data: any, + data: unknown, } // This schema allows the expansion of additional line types in the future diff --git a/webapp/src/telemetry/telemetryClient.ts b/webapp/src/telemetry/telemetryClient.ts index 6da84a015..4c09cd8b1 100644 --- a/webapp/src/telemetry/telemetryClient.ts +++ b/webapp/src/telemetry/telemetryClient.ts @@ -28,7 +28,7 @@ class TelemetryClient { this.user = user } - trackEvent(category: string, event: string, props?: any): void { + trackEvent(category: string, event: string, props?: unknown): void { if (this.telemetryHandler) { const userId = this.user?.id this.telemetryHandler.trackEvent(userId || '', '', category, event, props) diff --git a/webapp/src/testUtils.tsx b/webapp/src/testUtils.tsx index 920deea48..4f4bf46ef 100644 --- a/webapp/src/testUtils.tsx +++ b/webapp/src/testUtils.tsx @@ -31,7 +31,7 @@ export function mockDOM(): void { return range } } -export function mockMatchMedia(result: any): void { +export function mockMatchMedia(result: {matches: boolean}): void { // We check if system preference is dark or light theme. // This is required to provide it's definition since // window.matchMedia doesn't exist in Jest.