From 430742a5bdf4421b46c6b14472bdd43926832714 Mon Sep 17 00:00:00 2001 From: Christopher Horobin Date: Thu, 12 Sep 2024 01:20:18 +0200 Subject: [PATCH] perf(react-router): reduce instantitions for relative routing after language service performance (#2319) --- packages/react-router/src/link.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-router/src/link.tsx b/packages/react-router/src/link.tsx index 2513d2b6d2..4b44a58193 100644 --- a/packages/react-router/src/link.tsx +++ b/packages/react-router/src/link.tsx @@ -119,7 +119,8 @@ export type SearchPaths< TSearchPath extends string, TPaths = ResolvePaths, TPrefix extends string = `${RemoveTrailingSlashes}/`, -> = TPaths extends `${TPrefix}${infer TRest}` ? TRest : never + TFilteredPaths = TPaths & `${TPrefix}${string}`, +> = TFilteredPaths extends `${TPrefix}${infer TRest}` ? TRest : never export type SearchRelativePathAutoComplete< TRouter extends AnyRouter,