@@ -42,7 +42,7 @@ import type { UseLoaderDepsRoute } from './useLoaderDeps'
4242import type { UseParamsRoute } from './useParams'
4343import type { UseSearchRoute } from './useSearch'
4444import type { UseRouteContextRoute } from './useRouteContext'
45- import type { LinkComponent } from './link'
45+ import type { LinkComponentRoute } from './link'
4646
4747declare module '@tanstack/router-core' {
4848 export interface UpdatableRouteOptionsExtensions {
@@ -63,7 +63,7 @@ declare module '@tanstack/router-core' {
6363 useLoaderDeps : UseLoaderDepsRoute < TId >
6464 useLoaderData : UseLoaderDataRoute < TId >
6565 useNavigate : ( ) => UseNavigateResult < TFullPath >
66- Link : LinkComponent < 'a' , TFullPath >
66+ Link : LinkComponentRoute < TFullPath >
6767 }
6868}
6969
@@ -137,13 +137,12 @@ export class RouteApi<
137137 return notFound ( { routeId : this . id as string , ...opts } )
138138 }
139139
140- Link : LinkComponent < 'a' , RouteTypesById < TRouter , TId > [ 'fullPath' ] > =
140+ Link : LinkComponentRoute < RouteTypesById < TRouter , TId > [ 'fullPath' ] > =
141141 React . forwardRef ( ( props , ref : React . ForwardedRef < HTMLAnchorElement > ) => {
142142 const router = useRouter ( )
143143 const fullPath = router . routesById [ this . id as string ] . fullPath
144144 return < Link ref = { ref } from = { fullPath as never } { ...props } />
145- } ) as unknown as LinkComponent <
146- 'a' ,
145+ } ) as unknown as LinkComponentRoute <
147146 RouteTypesById < TRouter , TId > [ 'fullPath' ]
148147 >
149148}
@@ -255,11 +254,11 @@ export class Route<
255254 return useNavigate ( { from : this . fullPath } )
256255 }
257256
258- Link : LinkComponent < 'a' , TFullPath > = React . forwardRef (
257+ Link : LinkComponentRoute < TFullPath > = React . forwardRef (
259258 ( props , ref : React . ForwardedRef < HTMLAnchorElement > ) => {
260259 return < Link ref = { ref } from = { this . fullPath as never } { ...props } />
261260 } ,
262- ) as unknown as LinkComponent < 'a' , TFullPath >
261+ ) as unknown as LinkComponentRoute < TFullPath >
263262}
264263
265264export function createRoute <
@@ -446,11 +445,11 @@ export class RootRoute<
446445 return useNavigate ( { from : this . fullPath } )
447446 }
448447
449- Link : LinkComponent < 'a' , '/' > = React . forwardRef (
448+ Link : LinkComponentRoute < '/' > = React . forwardRef (
450449 ( props , ref : React . ForwardedRef < HTMLAnchorElement > ) => {
451450 return < Link ref = { ref } from = { this . fullPath } { ...props } />
452451 } ,
453- ) as unknown as LinkComponent < 'a' , '/' >
452+ ) as unknown as LinkComponentRoute < '/' >
454453}
455454
456455export function createRootRoute <
0 commit comments