From d0f1a7cc4b16afcf8e993108fcf963efe4243c92 Mon Sep 17 00:00:00 2001 From: Felipe Cardoso Date: Thu, 6 Nov 2025 00:49:46 +0100 Subject: [PATCH] Refine `isE2ETestMode` type definition to improve type safety and readability --- frontend/src/lib/auth/storage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/lib/auth/storage.ts b/frontend/src/lib/auth/storage.ts index a728e29..96b2900 100644 --- a/frontend/src/lib/auth/storage.ts +++ b/frontend/src/lib/auth/storage.ts @@ -25,7 +25,7 @@ export type StorageMethod = 'cookie' | 'localStorage'; * This flag is set by E2E tests to skip encryption for easier testing */ function isE2ETestMode(): boolean { - return typeof window !== 'undefined' && (window as any).__PLAYWRIGHT_TEST__ === true; + return typeof window !== 'undefined' && (window as { __PLAYWRIGHT_TEST__?: boolean }).__PLAYWRIGHT_TEST__ === true; } /**