From d9d8b8ebfdb987fb1713b09e18dd7da68562696d Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 23 Nov 2025 13:03:24 +0100 Subject: [PATCH 1/2] Improve AgnosticBaseRouteObject type for projects using exactOptionalPropertyTypes Projects that use typescript with the exactOptionalPropertyTypes=true setting see a type error when using react-router. The workaround of using skipLibCheck=false is not desirable as it weakens type-system accuracy for the whole project. https://www.typescriptlang.org/tsconfig/#skipLibCheck Fixes #10392 Fixes #11991 Fixes #14504 --- packages/react-router/lib/router/utils.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/react-router/lib/router/utils.ts b/packages/react-router/lib/router/utils.ts index b670d47781..d682fcf1aa 100644 --- a/packages/react-router/lib/router/utils.ts +++ b/packages/react-router/lib/router/utils.ts @@ -628,14 +628,14 @@ export type LazyRouteDefinition = * Base RouteObject with common props shared by all types of routes */ type AgnosticBaseRouteObject = { - caseSensitive?: boolean; - path?: string; - id?: string; - middleware?: MiddlewareFunction[]; - loader?: LoaderFunction | boolean; - action?: ActionFunction | boolean; - hasErrorBoundary?: boolean; - shouldRevalidate?: ShouldRevalidateFunction; + caseSensitive?: boolean | undefined; + path?: string | undefined; + id?: string | undefined; + middleware?: MiddlewareFunction[] | undefined; + loader?: LoaderFunction | boolean | undefined; + action?: ActionFunction | boolean | undefined; + hasErrorBoundary?: boolean | undefined; + shouldRevalidate?: ShouldRevalidateFunction | undefined; handle?: any; lazy?: LazyRouteDefinition; }; From 344cf496a219c2073a2a066d6abb5e4b7f5993f2 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 23 Nov 2025 13:14:22 +0100 Subject: [PATCH 2/2] Sign CLA --- contributors.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/contributors.yml b/contributors.yml index b1cefda8b7..08a1f590ee 100644 --- a/contributors.yml +++ b/contributors.yml @@ -39,6 +39,7 @@ - arnassavickas - aroyan - Artur- +- AsamK - ashusnapx - avipatel97 - awreese