Skip to content

Commit

Permalink
perf(react-router): reduce instantitions for relative routing after l…
Browse files Browse the repository at this point in the history
…anguage service performance (#2319)
  • Loading branch information
chorobin committed Sep 11, 2024
1 parent c30c49d commit 430742a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react-router/src/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ export type SearchPaths<
TSearchPath extends string,
TPaths = ResolvePaths<TRouter, TSearchPath>,
TPrefix extends string = `${RemoveTrailingSlashes<TSearchPath>}/`,
> = TPaths extends `${TPrefix}${infer TRest}` ? TRest : never
TFilteredPaths = TPaths & `${TPrefix}${string}`,
> = TFilteredPaths extends `${TPrefix}${infer TRest}` ? TRest : never

export type SearchRelativePathAutoComplete<
TRouter extends AnyRouter,
Expand Down

0 comments on commit 430742a

Please sign in to comment.