Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

routeTree.gen.ts

112 lines3.1 KB

1/* eslint-disable */
2​
3// @ts-nocheck
4​
5// noinspection JSUnusedGlobalSymbols
6​
7// This file was automatically generated by TanStack Router.
8// You should NOT make any changes in this file as it will be overwritten.
9// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
10​
11import { Route as rootRouteImport } from './routes/__root'
12import { Route as IndexRouteImport } from './routes/index'
13import { Route as PostsRouteImport } from './routes/posts'
14import { Route as PostsPostIdRouteImport } from './routes/posts.$postId'
15​
16const IndexRoute = IndexRouteImport.update({
17 id: '/',
18 path: '/',
19 getParentRoute: () => rootRouteImport,
20} as any)
21const PostsRoute = PostsRouteImport.update({
22 id: '/posts',
23 path: '/posts',
24 getParentRoute: () => rootRouteImport,
25} as any)
26const PostsPostIdRoute = PostsPostIdRouteImport.update({
27 id: '/$postId',
28 path: '/$postId',
29 getParentRoute: () => PostsRoute,
30} as any)
31​
32export interface FileRoutesByFullPath {
33 '/': typeof IndexRoute
34 '/posts': typeof PostsRouteWithChildren
35 '/posts/$postId': typeof PostsPostIdRoute
37export interface FileRoutesByTo {
38 '/': typeof IndexRoute
39 '/posts': typeof PostsRouteWithChildren
40 '/posts/$postId': typeof PostsPostIdRoute
42export interface FileRoutesById {
43 __root__: typeof rootRouteImport
44 '/': typeof IndexRoute
45 '/posts': typeof PostsRouteWithChildren
46 '/posts/$postId': typeof PostsPostIdRoute
48export interface FileRouteTypes {
49 fileRoutesByFullPath: FileRoutesByFullPath
50 fullPaths: '/' | '/posts' | '/posts/$postId'
51 fileRoutesByTo: FileRoutesByTo
52 to: '/' | '/posts' | '/posts/$postId'
53 id: '__root__' | '/' | '/posts' | '/posts/$postId'
54 fileRoutesById: FileRoutesById
56export interface RootRouteChildren {
57 IndexRoute: typeof IndexRoute
58 PostsRoute: typeof PostsRouteWithChildren
60​
61declare module '@tanstack/react-router' {
62 interface FileRoutesByPath {
63 '/': {
64 id: '/'
65 path: '/'
66 fullPath: '/'
67 preLoaderRoute: typeof IndexRouteImport
68 parentRoute: typeof rootRouteImport
69 }
70 '/posts': {
71 id: '/posts'
72 path: '/posts'
73 fullPath: '/posts'
74 preLoaderRoute: typeof PostsRouteImport
75 parentRoute: typeof rootRouteImport
76 }
77 '/posts/$postId': {
78 id: '/posts/$postId'
79 path: '/$postId'
80 fullPath: '/posts/$postId'
81 preLoaderRoute: typeof PostsPostIdRouteImport
82 parentRoute: typeof PostsRoute
83 }
84 }
86​
87interface PostsRouteChildren {
88 PostsPostIdRoute: typeof PostsPostIdRoute
90​
91const PostsRouteChildren: PostsRouteChildren = {
92 PostsPostIdRoute: PostsPostIdRoute,
94​
95const PostsRouteWithChildren = PostsRoute._addFileChildren(PostsRouteChildren)
96​
97const rootRouteChildren: RootRouteChildren = {
98 IndexRoute: IndexRoute,
99 PostsRoute: PostsRouteWithChildren,
101export const routeTree = rootRouteImport
102 ._addFileChildren(rootRouteChildren)
103 ._addFileTypes<FileRouteTypes>()
104​
105import type { getRouter } from './router.tsx'
106import type { createStart } from '@tanstack/react-start'
107declare module '@tanstack/react-start' {
108 interface Register {
109 ssr: true
110 router: Awaited<ReturnType<typeof getRouter>>
111 }