Skip to content

Commit 78c5a42

Browse files
committed
cleanup
1 parent f6f8507 commit 78c5a42

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

packages/router-sitemap/src/generateSitemap.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export interface SitemapEntry extends StaticEntryOptions {
1717
loc: string
1818
}
1919

20-
// Utility types for route param detection
2120
type SplitPath<TSegment extends string> =
2221
TSegment extends `${infer Segment}/${infer Rest}`
2322
? Segment | SplitPath<Rest>
@@ -40,13 +39,9 @@ export type DynamicRouteValue =
4039
| Array<DynamicEntryOptions>
4140
| (() => Array<DynamicEntryOptions> | Promise<Array<DynamicEntryOptions>>)
4241

43-
/**
44-
* Pick which shape to use based on whether `TRoute` is dynamic or static.
45-
*/
4642
type RouteValue<TRoute extends string> =
4743
RouteIsDynamic<TRoute> extends true ? DynamicRouteValue : StaticRouteValue
4844

49-
/** Sitemap configuration */
5045
export interface SitemapConfig<
5146
TRouter extends RegisteredRouter = RegisteredRouter,
5247
> {
@@ -120,7 +115,7 @@ function isValidLastMod(lastmod: string | Date): boolean {
120115
return false
121116
}
122117

123-
/** Throw if sitemap entry value is invalid. */
118+
/** Throws if sitemap entry value is invalid. */
124119
function validateEntry(
125120
route: string,
126121
entry: StaticEntryOptions | DynamicEntryOptions,
@@ -151,9 +146,7 @@ function validateEntry(
151146
}
152147
}
153148

154-
/**
155-
* Generate sitemap XML from configuration
156-
*/
149+
/** Generate sitemap XML from configuration */
157150
export async function generateSitemap<
158151
TRouter extends RegisteredRouter = RegisteredRouter,
159152
>(config: SitemapConfig<TRouter>): Promise<string> {

0 commit comments

Comments
 (0)