From ebe31a9bf70347e704d17af11b2bd17a6e0bb969 Mon Sep 17 00:00:00 2001 From: Joe Baker Date: Tue, 17 Dec 2024 10:05:31 +0000 Subject: [PATCH] fix: types --- apps/nextjs/src/hooks/useReactScan.ts | 6 ++++++ apps/nextjs/tests-e2e/tests/chat-performance.test.ts | 1 + 2 files changed, 7 insertions(+) diff --git a/apps/nextjs/src/hooks/useReactScan.ts b/apps/nextjs/src/hooks/useReactScan.ts index 5cf5e6af..e4eb5da1 100644 --- a/apps/nextjs/src/hooks/useReactScan.ts +++ b/apps/nextjs/src/hooks/useReactScan.ts @@ -5,6 +5,12 @@ import { aiLogger } from "@oakai/logger"; const log = aiLogger("testing"); +declare global { + interface Window { + NEXT_PUBLIC_ENABLE_RENDER_SCAN?: string; + } +} + function getWindowPropertyName(component: React.ComponentType): string { return `reactScan${component.displayName ?? component.name ?? "UnknownComponent"}`; } diff --git a/apps/nextjs/tests-e2e/tests/chat-performance.test.ts b/apps/nextjs/tests-e2e/tests/chat-performance.test.ts index ddabb3ed..d4b4e5a8 100644 --- a/apps/nextjs/tests-e2e/tests/chat-performance.test.ts +++ b/apps/nextjs/tests-e2e/tests/chat-performance.test.ts @@ -9,6 +9,7 @@ import { isFinished } from "./aila-chat/helpers"; declare global { interface Window { reactScanLessonPlanDisplay: { renderCount: number }; + NEXT_PUBLIC_ENABLE_RENDER_SCAN?: string; } }