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

routeTree.gen.ts

298 lines7.8 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​
11// Import Routes
12​
13import { Route as rootRoute } from './routes/__root'
14import { Route as PostsImport } from './routes/posts'
15import { Route as LayoutImport } from './routes/_layout'
16import { Route as IndexImport } from './routes/index'
17import { Route as PostsIndexImport } from './routes/posts.index'
18import { Route as PostsPostIdImport } from './routes/posts.$postId'
19import { Route as LayoutLayout2Import } from './routes/_layout/_layout-2'
20import { Route as LayoutLayout2LayoutBImport } from './routes/_layout/_layout-2/layout-b'
21import { Route as LayoutLayout2LayoutAImport } from './routes/_layout/_layout-2/layout-a'
22​
23// Create/Update Routes
24​
25const PostsRoute = PostsImport.update({
26 id: '/posts',
27 path: '/posts',
28 getParentRoute: () => rootRoute,
29} as any)
30​
31const LayoutRoute = LayoutImport.update({
32 id: '/_layout',
33 getParentRoute: () => rootRoute,
34} as any)
35​
36const IndexRoute = IndexImport.update({
37 id: '/',
38 path: '/',
39 getParentRoute: () => rootRoute,
40} as any)
41​
42const PostsIndexRoute = PostsIndexImport.update({
43 id: '/',
44 path: '/',
45 getParentRoute: () => PostsRoute,
46} as any)
47​
48const PostsPostIdRoute = PostsPostIdImport.update({
49 id: '/$postId',
50 path: '/$postId',
51 getParentRoute: () => PostsRoute,
52} as any)
53​
54const LayoutLayout2Route = LayoutLayout2Import.update({
55 id: '/_layout-2',
56 getParentRoute: () => LayoutRoute,
57} as any)
58​
59const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBImport.update({
60 id: '/layout-b',
61 path: '/layout-b',
62 getParentRoute: () => LayoutLayout2Route,
63} as any)
64​
65const LayoutLayout2LayoutARoute = LayoutLayout2LayoutAImport.update({
66 id: '/layout-a',
67 path: '/layout-a',
68 getParentRoute: () => LayoutLayout2Route,
69} as any)
70​
71// Populate the FileRoutesByPath interface
72​
73declare module '@tanstack/react-router' {
74 interface FileRoutesByPath {
75 '/': {
76 id: '/'
77 path: '/'
78 fullPath: '/'
79 preLoaderRoute: typeof IndexImport
80 parentRoute: typeof rootRoute
81 }
82 '/_layout': {
83 id: '/_layout'
84 path: ''
85 fullPath: ''
86 preLoaderRoute: typeof LayoutImport
87 parentRoute: typeof rootRoute
88 }
89 '/posts': {
90 id: '/posts'
91 path: '/posts'
92 fullPath: '/posts'
93 preLoaderRoute: typeof PostsImport
94 parentRoute: typeof rootRoute
95 }
96 '/_layout/_layout-2': {
97 id: '/_layout/_layout-2'
98 path: ''
99 fullPath: ''
100 preLoaderRoute: typeof LayoutLayout2Import
101 parentRoute: typeof LayoutImport
102 }
103 '/posts/$postId': {
104 id: '/posts/$postId'
105 path: '/$postId'
106 fullPath: '/posts/$postId'
107 preLoaderRoute: typeof PostsPostIdImport
108 parentRoute: typeof PostsImport
109 }
110 '/posts/': {
111 id: '/posts/'
112 path: '/'
113 fullPath: '/posts/'
114 preLoaderRoute: typeof PostsIndexImport
115 parentRoute: typeof PostsImport
116 }
117 '/_layout/_layout-2/layout-a': {
118 id: '/_layout/_layout-2/layout-a'
119 path: '/layout-a'
120 fullPath: '/layout-a'
121 preLoaderRoute: typeof LayoutLayout2LayoutAImport
122 parentRoute: typeof LayoutLayout2Import
123 }
124 '/_layout/_layout-2/layout-b': {
125 id: '/_layout/_layout-2/layout-b'
126 path: '/layout-b'
127 fullPath: '/layout-b'
128 preLoaderRoute: typeof LayoutLayout2LayoutBImport
129 parentRoute: typeof LayoutLayout2Import
130 }
131 }
133​
134// Create and export the route tree
135​
136interface LayoutLayout2RouteChildren {
137 LayoutLayout2LayoutARoute: typeof LayoutLayout2LayoutARoute
138 LayoutLayout2LayoutBRoute: typeof LayoutLayout2LayoutBRoute
140​
141const LayoutLayout2RouteChildren: LayoutLayout2RouteChildren = {
142 LayoutLayout2LayoutARoute: LayoutLayout2LayoutARoute,
143 LayoutLayout2LayoutBRoute: LayoutLayout2LayoutBRoute,
145​
146const LayoutLayout2RouteWithChildren = LayoutLayout2Route._addFileChildren(
147 LayoutLayout2RouteChildren,
149​
150interface LayoutRouteChildren {
151 LayoutLayout2Route: typeof LayoutLayout2RouteWithChildren
153​
154const LayoutRouteChildren: LayoutRouteChildren = {
155 LayoutLayout2Route: LayoutLayout2RouteWithChildren,
157​
158const LayoutRouteWithChildren =
159 LayoutRoute._addFileChildren(LayoutRouteChildren)
160​
161interface PostsRouteChildren {
162 PostsPostIdRoute: typeof PostsPostIdRoute
163 PostsIndexRoute: typeof PostsIndexRoute
165​
166const PostsRouteChildren: PostsRouteChildren = {
167 PostsPostIdRoute: PostsPostIdRoute,
168 PostsIndexRoute: PostsIndexRoute,
170​
171const PostsRouteWithChildren = PostsRoute._addFileChildren(PostsRouteChildren)
172​
173export interface FileRoutesByFullPath {
174 '/': typeof IndexRoute
175 '': typeof LayoutLayout2RouteWithChildren
176 '/posts': typeof PostsRouteWithChildren
177 '/posts/$postId': typeof PostsPostIdRoute
178 '/posts/': typeof PostsIndexRoute
179 '/layout-a': typeof LayoutLayout2LayoutARoute
180 '/layout-b': typeof LayoutLayout2LayoutBRoute
182​
183export interface FileRoutesByTo {
184 '/': typeof IndexRoute
185 '': typeof LayoutLayout2RouteWithChildren
186 '/posts/$postId': typeof PostsPostIdRoute
187 '/posts': typeof PostsIndexRoute
188 '/layout-a': typeof LayoutLayout2LayoutARoute
189 '/layout-b': typeof LayoutLayout2LayoutBRoute
191​
192export interface FileRoutesById {
193 __root__: typeof rootRoute
194 '/': typeof IndexRoute
195 '/_layout': typeof LayoutRouteWithChildren
196 '/posts': typeof PostsRouteWithChildren
197 '/_layout/_layout-2': typeof LayoutLayout2RouteWithChildren
198 '/posts/$postId': typeof PostsPostIdRoute
199 '/posts/': typeof PostsIndexRoute
200 '/_layout/_layout-2/layout-a': typeof LayoutLayout2LayoutARoute
201 '/_layout/_layout-2/layout-b': typeof LayoutLayout2LayoutBRoute
203​
204export interface FileRouteTypes {
205 fileRoutesByFullPath: FileRoutesByFullPath
206 fullPaths:
207 | '/'
208 | ''
209 | '/posts'
210 | '/posts/$postId'
211 | '/posts/'
212 | '/layout-a'
213 | '/layout-b'
214 fileRoutesByTo: FileRoutesByTo
215 to: '/' | '' | '/posts/$postId' | '/posts' | '/layout-a' | '/layout-b'
216 id:
217 | '__root__'
218 | '/'
219 | '/_layout'
220 | '/posts'
221 | '/_layout/_layout-2'
222 | '/posts/$postId'
223 | '/posts/'
224 | '/_layout/_layout-2/layout-a'
225 | '/_layout/_layout-2/layout-b'
226 fileRoutesById: FileRoutesById
228​
229export interface RootRouteChildren {
230 IndexRoute: typeof IndexRoute
231 LayoutRoute: typeof LayoutRouteWithChildren
232 PostsRoute: typeof PostsRouteWithChildren
234​
235const rootRouteChildren: RootRouteChildren = {
236 IndexRoute: IndexRoute,
237 LayoutRoute: LayoutRouteWithChildren,
238 PostsRoute: PostsRouteWithChildren,
240​
241export const routeTree = rootRoute
242 ._addFileChildren(rootRouteChildren)
243 ._addFileTypes<FileRouteTypes>()
244​
245/* ROUTE_MANIFEST_START
247 "routes": {
248 "__root__": {
249 "filePath": "__root.tsx",
250 "children": [
251 "/",
252 "/_layout",
253 "/posts"
254 ]
255 },
256 "/": {
257 "filePath": "index.tsx"
258 },
259 "/_layout": {
260 "filePath": "_layout.tsx",
261 "children": [
262 "/_layout/_layout-2"
263 ]
264 },
265 "/posts": {
266 "filePath": "posts.tsx",
267 "children": [
268 "/posts/$postId",
269 "/posts/"
270 ]
271 },
272 "/_layout/_layout-2": {
273 "filePath": "_layout/_layout-2.tsx",
274 "parent": "/_layout",
275 "children": [
276 "/_layout/_layout-2/layout-a",
277 "/_layout/_layout-2/layout-b"
278 ]
279 },
280 "/posts/$postId": {
281 "filePath": "posts.$postId.tsx",
282 "parent": "/posts"
283 },
284 "/posts/": {
285 "filePath": "posts.index.tsx",
286 "parent": "/posts"
287 },
288 "/_layout/_layout-2/layout-a": {
289 "filePath": "_layout/_layout-2/layout-a.tsx",
290 "parent": "/_layout/_layout-2"
291 },
292 "/_layout/_layout-2/layout-b": {
293 "filePath": "_layout/_layout-2/layout-b.tsx",
294 "parent": "/_layout/_layout-2"
295 }
296 }
298ROUTE_MANIFEST_END */