( path?: TFilePath, )
| 37 | import type { UseRouteContextRoute } from './useRouteContext' |
| 38 | |
| 39 | export function createFileRoute< |
| 40 | TFilePath extends keyof FileRoutesByPath, |
| 41 | TParentRoute extends AnyRoute = FileRoutesByPath[TFilePath]['parentRoute'], |
| 42 | TId extends RouteConstraints['TId'] = FileRoutesByPath[TFilePath]['id'], |
| 43 | TPath extends RouteConstraints['TPath'] = FileRoutesByPath[TFilePath]['path'], |
| 44 | TFullPath extends RouteConstraints['TFullPath'] = |
| 45 | FileRoutesByPath[TFilePath]['fullPath'], |
| 46 | >( |
| 47 | path?: TFilePath, |
| 48 | ): FileRoute<TFilePath, TParentRoute, TId, TPath, TFullPath>['createRoute'] { |
| 49 | if (typeof path === 'object') { |
| 50 | return new FileRoute<TFilePath, TParentRoute, TId, TPath, TFullPath>(path, { |
| 51 | silent: true, |
| 52 | }).createRoute(path) as any |
| 53 | } |
| 54 | return new FileRoute<TFilePath, TParentRoute, TId, TPath, TFullPath>(path, { |
| 55 | silent: true, |
| 56 | }).createRoute |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | @deprecated It's no longer recommended to use the `FileRoute` class directly. |
no outgoing calls
no test coverage detected