@@ -17,7 +17,6 @@ export interface SitemapEntry extends StaticEntryOptions {
17
17
loc : string
18
18
}
19
19
20
- // Utility types for route param detection
21
20
type SplitPath < TSegment extends string > =
22
21
TSegment extends `${infer Segment } /${infer Rest } `
23
22
? Segment | SplitPath < Rest >
@@ -40,13 +39,9 @@ export type DynamicRouteValue =
40
39
| Array < DynamicEntryOptions >
41
40
| ( ( ) => Array < DynamicEntryOptions > | Promise < Array < DynamicEntryOptions > > )
42
41
43
- /**
44
- * Pick which shape to use based on whether `TRoute` is dynamic or static.
45
- */
46
42
type RouteValue < TRoute extends string > =
47
43
RouteIsDynamic < TRoute > extends true ? DynamicRouteValue : StaticRouteValue
48
44
49
- /** Sitemap configuration */
50
45
export interface SitemapConfig <
51
46
TRouter extends RegisteredRouter = RegisteredRouter ,
52
47
> {
@@ -120,7 +115,7 @@ function isValidLastMod(lastmod: string | Date): boolean {
120
115
return false
121
116
}
122
117
123
- /** Throw if sitemap entry value is invalid. */
118
+ /** Throws if sitemap entry value is invalid. */
124
119
function validateEntry (
125
120
route : string ,
126
121
entry : StaticEntryOptions | DynamicEntryOptions ,
@@ -151,9 +146,7 @@ function validateEntry(
151
146
}
152
147
}
153
148
154
- /**
155
- * Generate sitemap XML from configuration
156
- */
149
+ /** Generate sitemap XML from configuration */
157
150
export async function generateSitemap <
158
151
TRouter extends RegisteredRouter = RegisteredRouter ,
159
152
> ( config : SitemapConfig < TRouter > ) : Promise < string > {
0 commit comments