@@ -19,40 +19,114 @@ import {
19
19
createServerFileRoute ,
20
20
} from '@tanstack/react-start/server'
21
21
22
+ import { ServerRoute as LibraryIdVersionDocsChar123Char125DotmdRouteImport } from './../../src/routes/$libraryId/$version.docs.{$}[.]md'
23
+ import { ServerRoute as LibraryIdVersionDocsFrameworkFrameworkChar123Char125DotmdRouteImport } from './../../src/routes/$libraryId/$version.docs.framework.$framework.{$}[.]md'
24
+
22
25
// Create/Update Routes
23
26
24
27
const rootRoute = createServerRoute ( )
25
28
29
+ const LibraryIdVersionDocsChar123Char125DotmdRoute =
30
+ LibraryIdVersionDocsChar123Char125DotmdRouteImport . update ( {
31
+ id : '/$libraryId/$version/docs/{$}.md' ,
32
+ path : '/$libraryId/$version/docs/{$}.md' ,
33
+ getParentRoute : ( ) => rootRoute ,
34
+ } as any )
35
+
36
+ const LibraryIdVersionDocsFrameworkFrameworkChar123Char125DotmdRoute =
37
+ LibraryIdVersionDocsFrameworkFrameworkChar123Char125DotmdRouteImport . update ( {
38
+ id : '/$libraryId/$version/docs/framework/$framework/{$}.md' ,
39
+ path : '/$libraryId/$version/docs/framework/$framework/{$}.md' ,
40
+ getParentRoute : ( ) => rootRoute ,
41
+ } as any )
42
+
26
43
// Populate the FileRoutesByPath interface
27
44
28
45
declare module '@tanstack/react-start/server' {
29
- interface FileRoutesByPath { }
46
+ interface FileRoutesByPath {
47
+ '/$libraryId/$version/docs/{$}.md' : {
48
+ id : '/$libraryId/$version/docs/{$}.md'
49
+ path : '/$libraryId/$version/docs/{$}.md'
50
+ fullPath : '/$libraryId/$version/docs/{$}.md'
51
+ preLoaderRoute : typeof LibraryIdVersionDocsChar123Char125DotmdRouteImport
52
+ parentRoute : typeof rootRoute
53
+ }
54
+ '/$libraryId/$version/docs/framework/$framework/{$}.md' : {
55
+ id : '/$libraryId/$version/docs/framework/$framework/{$}.md'
56
+ path : '/$libraryId/$version/docs/framework/$framework/{$}.md'
57
+ fullPath : '/$libraryId/$version/docs/framework/$framework/{$}.md'
58
+ preLoaderRoute : typeof LibraryIdVersionDocsFrameworkFrameworkChar123Char125DotmdRouteImport
59
+ parentRoute : typeof rootRoute
60
+ }
61
+ }
30
62
}
31
63
32
64
// Add type-safety to the createFileRoute function across the route tree
33
65
66
+ declare module './../../src/routes/$libraryId/$version.docs.{$}[.]md' {
67
+ const createServerFileRoute : CreateServerFileRoute <
68
+ FileRoutesByPath [ '/$libraryId/$version/docs/{$}.md' ] [ 'parentRoute' ] ,
69
+ FileRoutesByPath [ '/$libraryId/$version/docs/{$}.md' ] [ 'id' ] ,
70
+ FileRoutesByPath [ '/$libraryId/$version/docs/{$}.md' ] [ 'path' ] ,
71
+ FileRoutesByPath [ '/$libraryId/$version/docs/{$}.md' ] [ 'fullPath' ] ,
72
+ unknown
73
+ >
74
+ }
75
+ declare module './../../src/routes/$libraryId/$version.docs.framework.$framework.{$}[.]md' {
76
+ const createServerFileRoute : CreateServerFileRoute <
77
+ FileRoutesByPath [ '/$libraryId/$version/docs/framework/$framework/{$}.md' ] [ 'parentRoute' ] ,
78
+ FileRoutesByPath [ '/$libraryId/$version/docs/framework/$framework/{$}.md' ] [ 'id' ] ,
79
+ FileRoutesByPath [ '/$libraryId/$version/docs/framework/$framework/{$}.md' ] [ 'path' ] ,
80
+ FileRoutesByPath [ '/$libraryId/$version/docs/framework/$framework/{$}.md' ] [ 'fullPath' ] ,
81
+ unknown
82
+ >
83
+ }
84
+
34
85
// Create and export the route tree
35
86
36
- export interface FileRoutesByFullPath { }
87
+ export interface FileRoutesByFullPath {
88
+ '/$libraryId/$version/docs/{$}.md' : typeof LibraryIdVersionDocsChar123Char125DotmdRoute
89
+ '/$libraryId/$version/docs/framework/$framework/{$}.md' : typeof LibraryIdVersionDocsFrameworkFrameworkChar123Char125DotmdRoute
90
+ }
37
91
38
- export interface FileRoutesByTo { }
92
+ export interface FileRoutesByTo {
93
+ '/$libraryId/$version/docs/{$}.md' : typeof LibraryIdVersionDocsChar123Char125DotmdRoute
94
+ '/$libraryId/$version/docs/framework/$framework/{$}.md' : typeof LibraryIdVersionDocsFrameworkFrameworkChar123Char125DotmdRoute
95
+ }
39
96
40
97
export interface FileRoutesById {
41
98
__root__ : typeof rootRoute
99
+ '/$libraryId/$version/docs/{$}.md' : typeof LibraryIdVersionDocsChar123Char125DotmdRoute
100
+ '/$libraryId/$version/docs/framework/$framework/{$}.md' : typeof LibraryIdVersionDocsFrameworkFrameworkChar123Char125DotmdRoute
42
101
}
43
102
44
103
export interface FileRouteTypes {
45
104
fileRoutesByFullPath : FileRoutesByFullPath
46
- fullPaths : never
105
+ fullPaths :
106
+ | '/$libraryId/$version/docs/{$}.md'
107
+ | '/$libraryId/$version/docs/framework/$framework/{$}.md'
47
108
fileRoutesByTo : FileRoutesByTo
48
- to : never
49
- id : '__root__'
109
+ to :
110
+ | '/$libraryId/$version/docs/{$}.md'
111
+ | '/$libraryId/$version/docs/framework/$framework/{$}.md'
112
+ id :
113
+ | '__root__'
114
+ | '/$libraryId/$version/docs/{$}.md'
115
+ | '/$libraryId/$version/docs/framework/$framework/{$}.md'
50
116
fileRoutesById : FileRoutesById
51
117
}
52
118
53
- export interface RootRouteChildren { }
119
+ export interface RootRouteChildren {
120
+ LibraryIdVersionDocsChar123Char125DotmdRoute : typeof LibraryIdVersionDocsChar123Char125DotmdRoute
121
+ LibraryIdVersionDocsFrameworkFrameworkChar123Char125DotmdRoute : typeof LibraryIdVersionDocsFrameworkFrameworkChar123Char125DotmdRoute
122
+ }
54
123
55
- const rootRouteChildren : RootRouteChildren = { }
124
+ const rootRouteChildren : RootRouteChildren = {
125
+ LibraryIdVersionDocsChar123Char125DotmdRoute :
126
+ LibraryIdVersionDocsChar123Char125DotmdRoute ,
127
+ LibraryIdVersionDocsFrameworkFrameworkChar123Char125DotmdRoute :
128
+ LibraryIdVersionDocsFrameworkFrameworkChar123Char125DotmdRoute ,
129
+ }
56
130
57
131
export const routeTree = rootRoute
58
132
. _addFileChildren ( rootRouteChildren )
@@ -63,7 +137,16 @@ export const routeTree = rootRoute
63
137
"routes": {
64
138
"__root__": {
65
139
"filePath": "__root.tsx",
66
- "children": []
140
+ "children": [
141
+ "/$libraryId/$version/docs/{$}.md",
142
+ "/$libraryId/$version/docs/framework/$framework/{$}.md"
143
+ ]
144
+ },
145
+ "/$libraryId/$version/docs/{$}.md": {
146
+ "filePath": "$libraryId/$version.docs.{$}[.]md.tsx"
147
+ },
148
+ "/$libraryId/$version/docs/framework/$framework/{$}.md": {
149
+ "filePath": "$libraryId/$version.docs.framework.$framework.{$}[.]md.tsx"
67
150
}
68
151
}
69
152
}
0 commit comments