11
11
// Import Routes
12
12
13
13
import { Route as rootRoute } from './routes/__root'
14
- import { Route as UsersImport } from './routes/users'
15
14
import { Route as RedirectImport } from './routes/redirect'
16
- import { Route as PostsImport } from './routes/posts'
17
15
import { Route as DeferredImport } from './routes/deferred'
18
16
import { Route as PathlessLayoutImport } from './routes/_pathlessLayout'
17
+ import { Route as UsersRouteImport } from './routes/users.route'
18
+ import { Route as PostsRouteImport } from './routes/posts.route'
19
19
import { Route as IndexImport } from './routes/index'
20
20
import { Route as UsersIndexImport } from './routes/users.index'
21
21
import { Route as PostsIndexImport } from './routes/posts.index'
@@ -28,24 +28,12 @@ import { Route as PathlessLayoutNestedLayoutRouteAImport } from './routes/_pathl
28
28
29
29
// Create/Update Routes
30
30
31
- const UsersRoute = UsersImport . update ( {
32
- id : '/users' ,
33
- path : '/users' ,
34
- getParentRoute : ( ) => rootRoute ,
35
- } as any )
36
-
37
31
const RedirectRoute = RedirectImport . update ( {
38
32
id : '/redirect' ,
39
33
path : '/redirect' ,
40
34
getParentRoute : ( ) => rootRoute ,
41
35
} as any )
42
36
43
- const PostsRoute = PostsImport . update ( {
44
- id : '/posts' ,
45
- path : '/posts' ,
46
- getParentRoute : ( ) => rootRoute ,
47
- } as any )
48
-
49
37
const DeferredRoute = DeferredImport . update ( {
50
38
id : '/deferred' ,
51
39
path : '/deferred' ,
@@ -57,6 +45,18 @@ const PathlessLayoutRoute = PathlessLayoutImport.update({
57
45
getParentRoute : ( ) => rootRoute ,
58
46
} as any )
59
47
48
+ const UsersRouteRoute = UsersRouteImport . update ( {
49
+ id : '/users' ,
50
+ path : '/users' ,
51
+ getParentRoute : ( ) => rootRoute ,
52
+ } as any )
53
+
54
+ const PostsRouteRoute = PostsRouteImport . update ( {
55
+ id : '/posts' ,
56
+ path : '/posts' ,
57
+ getParentRoute : ( ) => rootRoute ,
58
+ } as any )
59
+
60
60
const IndexRoute = IndexImport . update ( {
61
61
id : '/' ,
62
62
path : '/' ,
@@ -66,25 +66,25 @@ const IndexRoute = IndexImport.update({
66
66
const UsersIndexRoute = UsersIndexImport . update ( {
67
67
id : '/' ,
68
68
path : '/' ,
69
- getParentRoute : ( ) => UsersRoute ,
69
+ getParentRoute : ( ) => UsersRouteRoute ,
70
70
} as any )
71
71
72
72
const PostsIndexRoute = PostsIndexImport . update ( {
73
73
id : '/' ,
74
74
path : '/' ,
75
- getParentRoute : ( ) => PostsRoute ,
75
+ getParentRoute : ( ) => PostsRouteRoute ,
76
76
} as any )
77
77
78
78
const UsersUserIdRoute = UsersUserIdImport . update ( {
79
79
id : '/$userId' ,
80
80
path : '/$userId' ,
81
- getParentRoute : ( ) => UsersRoute ,
81
+ getParentRoute : ( ) => UsersRouteRoute ,
82
82
} as any )
83
83
84
84
const PostsPostIdRoute = PostsPostIdImport . update ( {
85
85
id : '/$postId' ,
86
86
path : '/$postId' ,
87
- getParentRoute : ( ) => PostsRoute ,
87
+ getParentRoute : ( ) => PostsRouteRoute ,
88
88
} as any )
89
89
90
90
const PathlessLayoutNestedLayoutRoute = PathlessLayoutNestedLayoutImport . update (
@@ -125,6 +125,20 @@ declare module '@tanstack/react-router' {
125
125
preLoaderRoute : typeof IndexImport
126
126
parentRoute : typeof rootRoute
127
127
}
128
+ '/posts' : {
129
+ id : '/posts'
130
+ path : '/posts'
131
+ fullPath : '/posts'
132
+ preLoaderRoute : typeof PostsRouteImport
133
+ parentRoute : typeof rootRoute
134
+ }
135
+ '/users' : {
136
+ id : '/users'
137
+ path : '/users'
138
+ fullPath : '/users'
139
+ preLoaderRoute : typeof UsersRouteImport
140
+ parentRoute : typeof rootRoute
141
+ }
128
142
'/_pathlessLayout' : {
129
143
id : '/_pathlessLayout'
130
144
path : ''
@@ -139,27 +153,13 @@ declare module '@tanstack/react-router' {
139
153
preLoaderRoute : typeof DeferredImport
140
154
parentRoute : typeof rootRoute
141
155
}
142
- '/posts' : {
143
- id : '/posts'
144
- path : '/posts'
145
- fullPath : '/posts'
146
- preLoaderRoute : typeof PostsImport
147
- parentRoute : typeof rootRoute
148
- }
149
156
'/redirect' : {
150
157
id : '/redirect'
151
158
path : '/redirect'
152
159
fullPath : '/redirect'
153
160
preLoaderRoute : typeof RedirectImport
154
161
parentRoute : typeof rootRoute
155
162
}
156
- '/users' : {
157
- id : '/users'
158
- path : '/users'
159
- fullPath : '/users'
160
- preLoaderRoute : typeof UsersImport
161
- parentRoute : typeof rootRoute
162
- }
163
163
'/_pathlessLayout/_nested-layout' : {
164
164
id : '/_pathlessLayout/_nested-layout'
165
165
path : ''
@@ -172,28 +172,28 @@ declare module '@tanstack/react-router' {
172
172
path : '/$postId'
173
173
fullPath : '/posts/$postId'
174
174
preLoaderRoute : typeof PostsPostIdImport
175
- parentRoute : typeof PostsImport
175
+ parentRoute : typeof PostsRouteImport
176
176
}
177
177
'/users/$userId' : {
178
178
id : '/users/$userId'
179
179
path : '/$userId'
180
180
fullPath : '/users/$userId'
181
181
preLoaderRoute : typeof UsersUserIdImport
182
- parentRoute : typeof UsersImport
182
+ parentRoute : typeof UsersRouteImport
183
183
}
184
184
'/posts/' : {
185
185
id : '/posts/'
186
186
path : '/'
187
187
fullPath : '/posts/'
188
188
preLoaderRoute : typeof PostsIndexImport
189
- parentRoute : typeof PostsImport
189
+ parentRoute : typeof PostsRouteImport
190
190
}
191
191
'/users/' : {
192
192
id : '/users/'
193
193
path : '/'
194
194
fullPath : '/users/'
195
195
preLoaderRoute : typeof UsersIndexImport
196
- parentRoute : typeof UsersImport
196
+ parentRoute : typeof UsersRouteImport
197
197
}
198
198
'/_pathlessLayout/_nested-layout/route-a' : {
199
199
id : '/_pathlessLayout/_nested-layout/route-a'
@@ -221,6 +221,34 @@ declare module '@tanstack/react-router' {
221
221
222
222
// Create and export the route tree
223
223
224
+ interface PostsRouteRouteChildren {
225
+ PostsPostIdRoute : typeof PostsPostIdRoute
226
+ PostsIndexRoute : typeof PostsIndexRoute
227
+ }
228
+
229
+ const PostsRouteRouteChildren : PostsRouteRouteChildren = {
230
+ PostsPostIdRoute : PostsPostIdRoute ,
231
+ PostsIndexRoute : PostsIndexRoute ,
232
+ }
233
+
234
+ const PostsRouteRouteWithChildren = PostsRouteRoute . _addFileChildren (
235
+ PostsRouteRouteChildren ,
236
+ )
237
+
238
+ interface UsersRouteRouteChildren {
239
+ UsersUserIdRoute : typeof UsersUserIdRoute
240
+ UsersIndexRoute : typeof UsersIndexRoute
241
+ }
242
+
243
+ const UsersRouteRouteChildren : UsersRouteRouteChildren = {
244
+ UsersUserIdRoute : UsersUserIdRoute ,
245
+ UsersIndexRoute : UsersIndexRoute ,
246
+ }
247
+
248
+ const UsersRouteRouteWithChildren = UsersRouteRoute . _addFileChildren (
249
+ UsersRouteRouteChildren ,
250
+ )
251
+
224
252
interface PathlessLayoutNestedLayoutRouteChildren {
225
253
PathlessLayoutNestedLayoutRouteARoute : typeof PathlessLayoutNestedLayoutRouteARoute
226
254
PathlessLayoutNestedLayoutRouteBRoute : typeof PathlessLayoutNestedLayoutRouteBRoute
@@ -251,37 +279,13 @@ const PathlessLayoutRouteWithChildren = PathlessLayoutRoute._addFileChildren(
251
279
PathlessLayoutRouteChildren ,
252
280
)
253
281
254
- interface PostsRouteChildren {
255
- PostsPostIdRoute : typeof PostsPostIdRoute
256
- PostsIndexRoute : typeof PostsIndexRoute
257
- }
258
-
259
- const PostsRouteChildren : PostsRouteChildren = {
260
- PostsPostIdRoute : PostsPostIdRoute ,
261
- PostsIndexRoute : PostsIndexRoute ,
262
- }
263
-
264
- const PostsRouteWithChildren = PostsRoute . _addFileChildren ( PostsRouteChildren )
265
-
266
- interface UsersRouteChildren {
267
- UsersUserIdRoute : typeof UsersUserIdRoute
268
- UsersIndexRoute : typeof UsersIndexRoute
269
- }
270
-
271
- const UsersRouteChildren : UsersRouteChildren = {
272
- UsersUserIdRoute : UsersUserIdRoute ,
273
- UsersIndexRoute : UsersIndexRoute ,
274
- }
275
-
276
- const UsersRouteWithChildren = UsersRoute . _addFileChildren ( UsersRouteChildren )
277
-
278
282
export interface FileRoutesByFullPath {
279
283
'/' : typeof IndexRoute
284
+ '/posts' : typeof PostsRouteRouteWithChildren
285
+ '/users' : typeof UsersRouteRouteWithChildren
280
286
'' : typeof PathlessLayoutNestedLayoutRouteWithChildren
281
287
'/deferred' : typeof DeferredRoute
282
- '/posts' : typeof PostsRouteWithChildren
283
288
'/redirect' : typeof RedirectRoute
284
- '/users' : typeof UsersRouteWithChildren
285
289
'/posts/$postId' : typeof PostsPostIdRoute
286
290
'/users/$userId' : typeof UsersUserIdRoute
287
291
'/posts/' : typeof PostsIndexRoute
@@ -308,11 +312,11 @@ export interface FileRoutesByTo {
308
312
export interface FileRoutesById {
309
313
__root__ : typeof rootRoute
310
314
'/' : typeof IndexRoute
315
+ '/posts' : typeof PostsRouteRouteWithChildren
316
+ '/users' : typeof UsersRouteRouteWithChildren
311
317
'/_pathlessLayout' : typeof PathlessLayoutRouteWithChildren
312
318
'/deferred' : typeof DeferredRoute
313
- '/posts' : typeof PostsRouteWithChildren
314
319
'/redirect' : typeof RedirectRoute
315
- '/users' : typeof UsersRouteWithChildren
316
320
'/_pathlessLayout/_nested-layout' : typeof PathlessLayoutNestedLayoutRouteWithChildren
317
321
'/posts/$postId' : typeof PostsPostIdRoute
318
322
'/users/$userId' : typeof UsersUserIdRoute
@@ -327,11 +331,11 @@ export interface FileRouteTypes {
327
331
fileRoutesByFullPath : FileRoutesByFullPath
328
332
fullPaths :
329
333
| '/'
334
+ | '/posts'
335
+ | '/users'
330
336
| ''
331
337
| '/deferred'
332
- | '/posts'
333
338
| '/redirect'
334
- | '/users'
335
339
| '/posts/$postId'
336
340
| '/users/$userId'
337
341
| '/posts/'
@@ -355,11 +359,11 @@ export interface FileRouteTypes {
355
359
id :
356
360
| '__root__'
357
361
| '/'
362
+ | '/posts'
363
+ | '/users'
358
364
| '/_pathlessLayout'
359
365
| '/deferred'
360
- | '/posts'
361
366
| '/redirect'
362
- | '/users'
363
367
| '/_pathlessLayout/_nested-layout'
364
368
| '/posts/$postId'
365
369
| '/users/$userId'
@@ -373,21 +377,21 @@ export interface FileRouteTypes {
373
377
374
378
export interface RootRouteChildren {
375
379
IndexRoute : typeof IndexRoute
380
+ PostsRouteRoute : typeof PostsRouteRouteWithChildren
381
+ UsersRouteRoute : typeof UsersRouteRouteWithChildren
376
382
PathlessLayoutRoute : typeof PathlessLayoutRouteWithChildren
377
383
DeferredRoute : typeof DeferredRoute
378
- PostsRoute : typeof PostsRouteWithChildren
379
384
RedirectRoute : typeof RedirectRoute
380
- UsersRoute : typeof UsersRouteWithChildren
381
385
PostsPostIdDeepRoute : typeof PostsPostIdDeepRoute
382
386
}
383
387
384
388
const rootRouteChildren : RootRouteChildren = {
385
389
IndexRoute : IndexRoute ,
390
+ PostsRouteRoute : PostsRouteRouteWithChildren ,
391
+ UsersRouteRoute : UsersRouteRouteWithChildren ,
386
392
PathlessLayoutRoute : PathlessLayoutRouteWithChildren ,
387
393
DeferredRoute : DeferredRoute ,
388
- PostsRoute : PostsRouteWithChildren ,
389
394
RedirectRoute : RedirectRoute ,
390
- UsersRoute : UsersRouteWithChildren ,
391
395
PostsPostIdDeepRoute : PostsPostIdDeepRoute ,
392
396
}
393
397
@@ -402,43 +406,43 @@ export const routeTree = rootRoute
402
406
"filePath": "__root.tsx",
403
407
"children": [
404
408
"/",
409
+ "/posts",
410
+ "/users",
405
411
"/_pathlessLayout",
406
412
"/deferred",
407
- "/posts",
408
413
"/redirect",
409
- "/users",
410
414
"/posts_/$postId/deep"
411
415
]
412
416
},
413
417
"/": {
414
418
"filePath": "index.tsx"
415
419
},
416
- "/_pathlessLayout": {
417
- "filePath": "_pathlessLayout.tsx",
418
- "children": [
419
- "/_pathlessLayout/_nested-layout"
420
- ]
421
- },
422
- "/deferred": {
423
- "filePath": "deferred.tsx"
424
- },
425
420
"/posts": {
426
- "filePath": "posts.tsx",
421
+ "filePath": "posts.route. tsx",
427
422
"children": [
428
423
"/posts/$postId",
429
424
"/posts/"
430
425
]
431
426
},
432
- "/redirect": {
433
- "filePath": "redirect.tsx"
434
- },
435
427
"/users": {
436
- "filePath": "users.tsx",
428
+ "filePath": "users.route. tsx",
437
429
"children": [
438
430
"/users/$userId",
439
431
"/users/"
440
432
]
441
433
},
434
+ "/_pathlessLayout": {
435
+ "filePath": "_pathlessLayout.tsx",
436
+ "children": [
437
+ "/_pathlessLayout/_nested-layout"
438
+ ]
439
+ },
440
+ "/deferred": {
441
+ "filePath": "deferred.tsx"
442
+ },
443
+ "/redirect": {
444
+ "filePath": "redirect.tsx"
445
+ },
442
446
"/_pathlessLayout/_nested-layout": {
443
447
"filePath": "_pathlessLayout/_nested-layout.tsx",
444
448
"parent": "/_pathlessLayout",
0 commit comments