@@ -35,6 +35,17 @@ import type { UseLoaderDepsRoute } from './useLoaderDeps'
3535import type { UseLoaderDataRoute } from './useLoaderData'
3636import type { UseRouteContextRoute } from './useRouteContext'
3737
38+ /**
39+ * Creates a file-based Route factory for a given path.
40+ *
41+ * Used by TanStack Router's file-based routing to associate a file with a
42+ * route. The returned function accepts standard route options. In normal usage
43+ * the `path` string is inserted and maintained by the `tsr` generator.
44+ *
45+ * @param path File path literal for the route (usually auto-generated).
46+ * @returns A function that accepts Route options and returns a Route instance.
47+ * @link https://tanstack.com/router/latest/docs/framework/react/api/router/createFileRouteFunction
48+ */
3849/**
3950 * Creates a file-based Route factory for a given path.
4051 *
@@ -66,6 +77,10 @@ export function createFileRoute<
6677 } ) . createRoute
6778}
6879
80+ /**
81+ @deprecated It's no longer recommended to use the `FileRoute` class directly.
82+ Instead, use `createFileRoute('/path/to/file')(options)` to create a file route.
83+ */
6984/**
7085 @deprecated It's no longer recommended to use the `FileRoute` class directly.
7186 Instead, use `createFileRoute('/path/to/file')(options)` to create a file route.
@@ -159,6 +174,11 @@ export class FileRoute<
159174 }
160175}
161176
177+ /**
178+ @deprecated It's recommended not to split loaders into separate files.
179+ Instead, place the loader function in the the main route file, inside the
180+ `createFileRoute('/path/to/file)(options)` options.
181+ */
162182/**
163183 @deprecated It's recommended not to split loaders into separate files.
164184 Instead, place the loader function in the the main route file, inside the
@@ -264,6 +284,18 @@ export class LazyRoute<TRoute extends AnyRoute> {
264284 }
265285}
266286
287+ /**
288+ * Creates a lazily-configurable code-based route stub by ID.
289+ *
290+ * Use this for code-splitting with code-based routes. The returned function
291+ * accepts only non-critical route options like `component`, `pendingComponent`,
292+ * `errorComponent`, and `notFoundComponent` which are applied when the route
293+ * is matched.
294+ *
295+ * @param id Route ID string literal to associate with the lazy route.
296+ * @returns A function that accepts lazy route options and returns a `LazyRoute`.
297+ * @link https://tanstack.com/router/latest/docs/framework/react/api/router/createLazyRouteFunction
298+ */
267299/**
268300 * Creates a lazily-configurable code-based route stub by ID.
269301 *
@@ -289,6 +321,17 @@ export function createLazyRoute<
289321 }
290322}
291323
324+ /**
325+ * Creates a lazily-configurable file-based route stub by file path.
326+ *
327+ * Use this for code-splitting with file-based routes (eg. `.lazy.tsx` files).
328+ * The returned function accepts only non-critical route options like
329+ * `component`, `pendingComponent`, `errorComponent`, and `notFoundComponent`.
330+ *
331+ * @param id File path literal for the route file.
332+ * @returns A function that accepts lazy route options and returns a `LazyRoute`.
333+ * @link https://tanstack.com/router/latest/docs/framework/react/api/router/createLazyFileRouteFunction
334+ */
292335/**
293336 * Creates a lazily-configurable file-based route stub by file path.
294337 *
0 commit comments