1313import { Route as rootRoute } from './routes/__root'
1414import { Route as IndexImport } from './routes/index'
1515import { Route as TodosNewImport } from './routes/todos/new'
16+ import { Route as TodosTodoIdEditImport } from './routes/todos/$todoId/edit'
1617
1718// Create/Update Routes
1819
@@ -28,6 +29,12 @@ const TodosNewRoute = TodosNewImport.update({
2829 getParentRoute : ( ) => rootRoute ,
2930} as any )
3031
32+ const TodosTodoIdEditRoute = TodosTodoIdEditImport . update ( {
33+ id : '/todos/$todoId/edit' ,
34+ path : '/todos/$todoId/edit' ,
35+ getParentRoute : ( ) => rootRoute ,
36+ } as any )
37+
3138// Populate the FileRoutesByPath interface
3239
3340declare module '@tanstack/react-router' {
@@ -46,6 +53,13 @@ declare module '@tanstack/react-router' {
4653 preLoaderRoute : typeof TodosNewImport
4754 parentRoute : typeof rootRoute
4855 }
56+ '/todos/$todoId/edit' : {
57+ id : '/todos/$todoId/edit'
58+ path : '/todos/$todoId/edit'
59+ fullPath : '/todos/$todoId/edit'
60+ preLoaderRoute : typeof TodosTodoIdEditImport
61+ parentRoute : typeof rootRoute
62+ }
4963 }
5064}
5165
@@ -54,36 +68,41 @@ declare module '@tanstack/react-router' {
5468export interface FileRoutesByFullPath {
5569 '/' : typeof IndexRoute
5670 '/todos/new' : typeof TodosNewRoute
71+ '/todos/$todoId/edit' : typeof TodosTodoIdEditRoute
5772}
5873
5974export interface FileRoutesByTo {
6075 '/' : typeof IndexRoute
6176 '/todos/new' : typeof TodosNewRoute
77+ '/todos/$todoId/edit' : typeof TodosTodoIdEditRoute
6278}
6379
6480export interface FileRoutesById {
6581 __root__ : typeof rootRoute
6682 '/' : typeof IndexRoute
6783 '/todos/new' : typeof TodosNewRoute
84+ '/todos/$todoId/edit' : typeof TodosTodoIdEditRoute
6885}
6986
7087export interface FileRouteTypes {
7188 fileRoutesByFullPath : FileRoutesByFullPath
72- fullPaths : '/' | '/todos/new'
89+ fullPaths : '/' | '/todos/new' | '/todos/$todoId/edit'
7390 fileRoutesByTo : FileRoutesByTo
74- to : '/' | '/todos/new'
75- id : '__root__' | '/' | '/todos/new'
91+ to : '/' | '/todos/new' | '/todos/$todoId/edit'
92+ id : '__root__' | '/' | '/todos/new' | '/todos/$todoId/edit'
7693 fileRoutesById : FileRoutesById
7794}
7895
7996export interface RootRouteChildren {
8097 IndexRoute : typeof IndexRoute
8198 TodosNewRoute : typeof TodosNewRoute
99+ TodosTodoIdEditRoute : typeof TodosTodoIdEditRoute
82100}
83101
84102const rootRouteChildren : RootRouteChildren = {
85103 IndexRoute : IndexRoute ,
86104 TodosNewRoute : TodosNewRoute ,
105+ TodosTodoIdEditRoute : TodosTodoIdEditRoute ,
87106}
88107
89108export const routeTree = rootRoute
@@ -97,14 +116,18 @@ export const routeTree = rootRoute
97116 "filePath": "__root.tsx",
98117 "children": [
99118 "/",
100- "/todos/new"
119+ "/todos/new",
120+ "/todos/$todoId/edit"
101121 ]
102122 },
103123 "/": {
104124 "filePath": "index.tsx"
105125 },
106126 "/todos/new": {
107127 "filePath": "todos/new.tsx"
128+ },
129+ "/todos/$todoId/edit": {
130+ "filePath": "todos/$todoId/edit.tsx"
108131 }
109132 }
110133}
0 commit comments