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,