( // eslint-disable-next-line unused-imports/no-unused-vars path?: TFilePath, )
| 36 | import type { UseRouteContextRoute } from './useRouteContext' |
| 37 | |
| 38 | export function createFileRoute< |
| 39 | TFilePath extends keyof FileRoutesByPath, |
| 40 | TParentRoute extends AnyRoute = FileRoutesByPath[TFilePath]['parentRoute'], |
| 41 | TId extends RouteConstraints['TId'] = FileRoutesByPath[TFilePath]['id'], |
| 42 | TPath extends RouteConstraints['TPath'] = FileRoutesByPath[TFilePath]['path'], |
| 43 | TFullPath extends RouteConstraints['TFullPath'] = |
| 44 | FileRoutesByPath[TFilePath]['fullPath'], |
| 45 | >( |
| 46 | // eslint-disable-next-line unused-imports/no-unused-vars |
| 47 | path?: TFilePath, |
| 48 | ): FileRoute<TFilePath, TParentRoute, TId, TPath, TFullPath>['createRoute'] { |
| 49 | return (options) => { |
| 50 | const route = createRoute(options as any) |
| 51 | ;(route as any).isRoot = false |
| 52 | return route as any |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | @deprecated It's no longer recommended to use the `FileRoute` class directly. |
no test coverage detected