Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// You should NOT make any changes in this file as it will be overwritten.
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.

import type { CreateFileRoute, FileRoutesByPath } from '@tanstack/react-router'

import { Route as rootRouteImport } from './routes/__root'
import { Route as WithoutLoaderRouteImport } from './routes/without-loader'
import { Route as ViewportTestRouteImport } from './routes/viewport-test'
Expand Down Expand Up @@ -220,97 +218,6 @@ declare module '@tanstack/react-router' {
}
}

declare module './routes/index' {
const createFileRoute: CreateFileRoute<
'/',
FileRoutesByPath['/']['parentRoute'],
FileRoutesByPath['/']['id'],
FileRoutesByPath['/']['path'],
FileRoutesByPath['/']['fullPath']
>
}
declare module './routes/_layout' {
const createFileRoute: CreateFileRoute<
'/_layout',
FileRoutesByPath['/_layout']['parentRoute'],
FileRoutesByPath['/_layout']['id'],
FileRoutesByPath['/_layout']['path'],
FileRoutesByPath['/_layout']['fullPath']
>
}
declare module './routes/posts' {
const createFileRoute: CreateFileRoute<
'/posts',
FileRoutesByPath['/posts']['parentRoute'],
FileRoutesByPath['/posts']['id'],
FileRoutesByPath['/posts']['path'],
FileRoutesByPath['/posts']['fullPath']
>
}
declare module './routes/viewport-test' {
const createFileRoute: CreateFileRoute<
'/viewport-test',
FileRoutesByPath['/viewport-test']['parentRoute'],
FileRoutesByPath['/viewport-test']['id'],
FileRoutesByPath['/viewport-test']['path'],
FileRoutesByPath['/viewport-test']['fullPath']
>
}
declare module './routes/without-loader' {
const createFileRoute: CreateFileRoute<
'/without-loader',
FileRoutesByPath['/without-loader']['parentRoute'],
FileRoutesByPath['/without-loader']['id'],
FileRoutesByPath['/without-loader']['path'],
FileRoutesByPath['/without-loader']['fullPath']
>
}
declare module './routes/_layout/_layout-2' {
const createFileRoute: CreateFileRoute<
'/_layout/_layout-2',
FileRoutesByPath['/_layout/_layout-2']['parentRoute'],
FileRoutesByPath['/_layout/_layout-2']['id'],
FileRoutesByPath['/_layout/_layout-2']['path'],
FileRoutesByPath['/_layout/_layout-2']['fullPath']
>
}
declare module './routes/posts.$postId' {
const createFileRoute: CreateFileRoute<
'/posts/$postId',
FileRoutesByPath['/posts/$postId']['parentRoute'],
FileRoutesByPath['/posts/$postId']['id'],
FileRoutesByPath['/posts/$postId']['path'],
FileRoutesByPath['/posts/$postId']['fullPath']
>
}
declare module './routes/posts.index' {
const createFileRoute: CreateFileRoute<
'/posts/',
FileRoutesByPath['/posts/']['parentRoute'],
FileRoutesByPath['/posts/']['id'],
FileRoutesByPath['/posts/']['path'],
FileRoutesByPath['/posts/']['fullPath']
>
}
declare module './routes/_layout/_layout-2/layout-a' {
const createFileRoute: CreateFileRoute<
'/_layout/_layout-2/layout-a',
FileRoutesByPath['/_layout/_layout-2/layout-a']['parentRoute'],
FileRoutesByPath['/_layout/_layout-2/layout-a']['id'],
FileRoutesByPath['/_layout/_layout-2/layout-a']['path'],
FileRoutesByPath['/_layout/_layout-2/layout-a']['fullPath']
>
}
declare module './routes/_layout/_layout-2/layout-b' {
const createFileRoute: CreateFileRoute<
'/_layout/_layout-2/layout-b',
FileRoutesByPath['/_layout/_layout-2/layout-b']['parentRoute'],
FileRoutesByPath['/_layout/_layout-2/layout-b']['id'],
FileRoutesByPath['/_layout/_layout-2/layout-b']['path'],
FileRoutesByPath['/_layout/_layout-2/layout-b']['fullPath']
>
}

interface LayoutLayout2RouteChildren {
LayoutLayout2LayoutARoute: typeof LayoutLayout2LayoutARoute
LayoutLayout2LayoutBRoute: typeof LayoutLayout2LayoutBRoute
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Outlet } from '@tanstack/react-router'
import { Outlet, createFileRoute } from '@tanstack/react-router'

export const Route = createFileRoute({
export const Route = createFileRoute('/_layout')({
component: LayoutComponent,
})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Link, Outlet } from '@tanstack/react-router'
import { Link, Outlet, createFileRoute } from '@tanstack/react-router'

export const Route = createFileRoute({
export const Route = createFileRoute('/_layout/_layout-2')({
component: LayoutComponent,
})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const Route = createFileRoute({
import { createFileRoute } from '@tanstack/react-router'
export const Route = createFileRoute('/_layout/_layout-2/layout-a')({
component: LayoutAComponent,
})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const Route = createFileRoute({
import { createFileRoute } from '@tanstack/react-router'
export const Route = createFileRoute('/_layout/_layout-2/layout-b')({
component: LayoutBComponent,
})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { createFileRoute } from '@tanstack/react-router'
import * as React from 'react'

export const Route = createFileRoute({
export const Route = createFileRoute('/')({
component: Home,
})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as React from 'react'
import { ErrorComponent } from '@tanstack/react-router'
import { ErrorComponent, createFileRoute } from '@tanstack/react-router'
import { fetchPost } from '../posts'
import type { ErrorComponentProps } from '@tanstack/react-router'

export const Route = createFileRoute({
export const Route = createFileRoute('/posts/$postId')({
loader: async ({ params: { postId } }) => fetchPost(postId),
errorComponent: PostErrorComponent as any,
notFoundComponent: () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { createFileRoute } from '@tanstack/react-router'
import * as React from 'react'

export const Route = createFileRoute({
export const Route = createFileRoute('/posts/')({
component: PostsIndexComponent,
})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from 'react'
import { Link, Outlet } from '@tanstack/react-router'
import { Link, Outlet, createFileRoute } from '@tanstack/react-router'
import { fetchPosts } from '../posts'

export const Route = createFileRoute({
export const Route = createFileRoute('/posts')({
loader: fetchPosts,
component: PostsComponent,
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export const Route = createFileRoute({
import { createFileRoute } from '@tanstack/react-router'
export const Route = createFileRoute('/viewport-test')({
component: () => <div>Hello /viewport-test!</div>,
})
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export const Route = createFileRoute({
import { createFileRoute } from '@tanstack/react-router'
export const Route = createFileRoute('/without-loader')({
component: () => <div>Hello /without-loader!</div>,
})
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { Route as IndexRouteImport } from './routes/index'
import { Route as PostsIndexRouteImport } from './routes/posts.index'
import { Route as PostsPostIdRouteImport } from './routes/posts.$postId'
import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2'
import { Route as TransitionCountQueryRouteImport } from './routes/transition/count/query'
import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b'
import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a'

Expand Down Expand Up @@ -47,11 +46,6 @@ const LayoutLayout2Route = LayoutLayout2RouteImport.update({
id: '/_layout-2',
getParentRoute: () => LayoutRoute,
} as any)
const TransitionCountQueryRoute = TransitionCountQueryRouteImport.update({
id: '/transition/count/query',
path: '/transition/count/query',
getParentRoute: () => rootRouteImport,
} as any)
const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({
id: '/layout-b',
path: '/layout-b',
Expand All @@ -70,15 +64,13 @@ export interface FileRoutesByFullPath {
'/posts/': typeof PostsIndexRoute
'/layout-a': typeof LayoutLayout2LayoutARoute
'/layout-b': typeof LayoutLayout2LayoutBRoute
'/transition/count/query': typeof TransitionCountQueryRoute
}
export interface FileRoutesByTo {
'/': typeof IndexRoute
'/posts/$postId': typeof PostsPostIdRoute
'/posts': typeof PostsIndexRoute
'/layout-a': typeof LayoutLayout2LayoutARoute
'/layout-b': typeof LayoutLayout2LayoutBRoute
'/transition/count/query': typeof TransitionCountQueryRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
Expand All @@ -90,7 +82,6 @@ export interface FileRoutesById {
'/posts/': typeof PostsIndexRoute
'/_layout/_layout-2/layout-a': typeof LayoutLayout2LayoutARoute
'/_layout/_layout-2/layout-b': typeof LayoutLayout2LayoutBRoute
'/transition/count/query': typeof TransitionCountQueryRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
Expand All @@ -101,15 +92,8 @@ export interface FileRouteTypes {
| '/posts/'
| '/layout-a'
| '/layout-b'
| '/transition/count/query'
fileRoutesByTo: FileRoutesByTo
to:
| '/'
| '/posts/$postId'
| '/posts'
| '/layout-a'
| '/layout-b'
| '/transition/count/query'
to: '/' | '/posts/$postId' | '/posts' | '/layout-a' | '/layout-b'
id:
| '__root__'
| '/'
Expand All @@ -120,14 +104,12 @@ export interface FileRouteTypes {
| '/posts/'
| '/_layout/_layout-2/layout-a'
| '/_layout/_layout-2/layout-b'
| '/transition/count/query'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
IndexRoute: typeof IndexRoute
LayoutRoute: typeof LayoutRouteWithChildren
PostsRoute: typeof PostsRouteWithChildren
TransitionCountQueryRoute: typeof TransitionCountQueryRoute
}

declare module '@tanstack/react-router' {
Expand Down Expand Up @@ -174,13 +156,6 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof LayoutLayout2RouteImport
parentRoute: typeof LayoutRoute
}
'/transition/count/query': {
id: '/transition/count/query'
path: '/transition/count/query'
fullPath: '/transition/count/query'
preLoaderRoute: typeof TransitionCountQueryRouteImport
parentRoute: typeof rootRouteImport
}
'/_layout/_layout-2/layout-b': {
id: '/_layout/_layout-2/layout-b'
path: '/layout-b'
Expand Down Expand Up @@ -239,7 +214,6 @@ const rootRouteChildren: RootRouteChildren = {
IndexRoute: IndexRoute,
LayoutRoute: LayoutRouteWithChildren,
PostsRoute: PostsRouteWithChildren,
TransitionCountQueryRoute: TransitionCountQueryRoute,
}
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// You should NOT make any changes in this file as it will be overwritten.
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.

import type { CreateFileRoute, FileRoutesByPath } from '@tanstack/solid-router'

import { Route as rootRouteImport } from './routes/__root'
import { Route as WithoutLoaderRouteImport } from './routes/without-loader'
import { Route as ViewportTestRouteImport } from './routes/viewport-test'
Expand Down Expand Up @@ -220,97 +218,6 @@ declare module '@tanstack/solid-router' {
}
}

declare module './routes/index' {
const createFileRoute: CreateFileRoute<
'/',
FileRoutesByPath['/']['parentRoute'],
FileRoutesByPath['/']['id'],
FileRoutesByPath['/']['path'],
FileRoutesByPath['/']['fullPath']
>
}
declare module './routes/_layout' {
const createFileRoute: CreateFileRoute<
'/_layout',
FileRoutesByPath['/_layout']['parentRoute'],
FileRoutesByPath['/_layout']['id'],
FileRoutesByPath['/_layout']['path'],
FileRoutesByPath['/_layout']['fullPath']
>
}
declare module './routes/posts' {
const createFileRoute: CreateFileRoute<
'/posts',
FileRoutesByPath['/posts']['parentRoute'],
FileRoutesByPath['/posts']['id'],
FileRoutesByPath['/posts']['path'],
FileRoutesByPath['/posts']['fullPath']
>
}
declare module './routes/viewport-test' {
const createFileRoute: CreateFileRoute<
'/viewport-test',
FileRoutesByPath['/viewport-test']['parentRoute'],
FileRoutesByPath['/viewport-test']['id'],
FileRoutesByPath['/viewport-test']['path'],
FileRoutesByPath['/viewport-test']['fullPath']
>
}
declare module './routes/without-loader' {
const createFileRoute: CreateFileRoute<
'/without-loader',
FileRoutesByPath['/without-loader']['parentRoute'],
FileRoutesByPath['/without-loader']['id'],
FileRoutesByPath['/without-loader']['path'],
FileRoutesByPath['/without-loader']['fullPath']
>
}
declare module './routes/_layout/_layout-2' {
const createFileRoute: CreateFileRoute<
'/_layout/_layout-2',
FileRoutesByPath['/_layout/_layout-2']['parentRoute'],
FileRoutesByPath['/_layout/_layout-2']['id'],
FileRoutesByPath['/_layout/_layout-2']['path'],
FileRoutesByPath['/_layout/_layout-2']['fullPath']
>
}
declare module './routes/posts.$postId' {
const createFileRoute: CreateFileRoute<
'/posts/$postId',
FileRoutesByPath['/posts/$postId']['parentRoute'],
FileRoutesByPath['/posts/$postId']['id'],
FileRoutesByPath['/posts/$postId']['path'],
FileRoutesByPath['/posts/$postId']['fullPath']
>
}
declare module './routes/posts.index' {
const createFileRoute: CreateFileRoute<
'/posts/',
FileRoutesByPath['/posts/']['parentRoute'],
FileRoutesByPath['/posts/']['id'],
FileRoutesByPath['/posts/']['path'],
FileRoutesByPath['/posts/']['fullPath']
>
}
declare module './routes/_layout/_layout-2/layout-a' {
const createFileRoute: CreateFileRoute<
'/_layout/_layout-2/layout-a',
FileRoutesByPath['/_layout/_layout-2/layout-a']['parentRoute'],
FileRoutesByPath['/_layout/_layout-2/layout-a']['id'],
FileRoutesByPath['/_layout/_layout-2/layout-a']['path'],
FileRoutesByPath['/_layout/_layout-2/layout-a']['fullPath']
>
}
declare module './routes/_layout/_layout-2/layout-b' {
const createFileRoute: CreateFileRoute<
'/_layout/_layout-2/layout-b',
FileRoutesByPath['/_layout/_layout-2/layout-b']['parentRoute'],
FileRoutesByPath['/_layout/_layout-2/layout-b']['id'],
FileRoutesByPath['/_layout/_layout-2/layout-b']['path'],
FileRoutesByPath['/_layout/_layout-2/layout-b']['fullPath']
>
}

interface LayoutLayout2RouteChildren {
LayoutLayout2LayoutARoute: typeof LayoutLayout2LayoutARoute
LayoutLayout2LayoutBRoute: typeof LayoutLayout2LayoutBRoute
Expand Down
Loading
Loading