( path?: TFilePath, )
| 48 | * @link https://tanstack.com/router/latest/docs/framework/react/api/router/createFileRouteFunction |
| 49 | */ |
| 50 | export function createFileRoute< |
| 51 | TFilePath extends keyof FileRoutesByPath, |
| 52 | TParentRoute extends AnyRoute = FileRoutesByPath[TFilePath]['parentRoute'], |
| 53 | TId extends RouteConstraints['TId'] = FileRoutesByPath[TFilePath]['id'], |
| 54 | TPath extends RouteConstraints['TPath'] = FileRoutesByPath[TFilePath]['path'], |
| 55 | TFullPath extends RouteConstraints['TFullPath'] = |
| 56 | FileRoutesByPath[TFilePath]['fullPath'], |
| 57 | >( |
| 58 | path?: TFilePath, |
| 59 | ): FileRoute<TFilePath, TParentRoute, TId, TPath, TFullPath>['createRoute'] { |
| 60 | if (typeof path === 'object') { |
| 61 | return new FileRoute<TFilePath, TParentRoute, TId, TPath, TFullPath>(path, { |
| 62 | silent: true, |
| 63 | }).createRoute(path) as any |
| 64 | } |
| 65 | return new FileRoute<TFilePath, TParentRoute, TId, TPath, TFullPath>(path, { |
| 66 | silent: true, |
| 67 | }).createRoute |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | @deprecated It's no longer recommended to use the `FileRoute` class directly. |
no outgoing calls
no test coverage detected