MCPcopy Create free account
hub / github.com/TanStack/router / createFileRoute

Function createFileRoute

packages/solid-router/src/fileRoute.ts:38–51  ·  view source on GitHub ↗
(
  path?: TFilePath,
)

Source from the content-addressed store, hash-verified

36import type { UseRouteContextRoute } from './useRouteContext'
37
38export 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 path?: TFilePath,
47): FileRoute<TFilePath, TParentRoute, TId, TPath, TFullPath>['createRoute'] {
48 return new FileRoute<TFilePath, TParentRoute, TId, TPath, TFullPath>(path, {
49 silent: true,
50 }).createRoute
51}
52
53/**
54 @deprecated It's no longer recommended to use the `FileRoute` class directly.

Callers 15

fileRoute.test.tsFile · 0.90
ssr-data-only.tsxFile · 0.90
ssr-function.tsxFile · 0.90
ssr-false.tsxFile · 0.90
ssr-data-only.tsxFile · 0.90
ssr-function.tsxFile · 0.90
ssr-false.tsxFile · 0.90
ssr-data-only.tsxFile · 0.90
ssr-function.tsxFile · 0.90
ssr-false.tsxFile · 0.90
ssr-data-only.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected