diff --git a/packages/react-router/src/ClientOnly.tsx b/packages/react-router/src/ClientOnly.tsx
index be16ff2eee..931804b259 100644
--- a/packages/react-router/src/ClientOnly.tsx
+++ b/packages/react-router/src/ClientOnly.tsx
@@ -28,11 +28,6 @@ export interface ClientOnlyProps {
* )
* ```
*/
-/**
- * Render children only after client hydration; otherwise render `fallback`.
- * Useful for components that require browser-only APIs.
- * @link https://tanstack.com/router/latest/docs/framework/react/api/router/clientOnlyComponent
- */
export function ClientOnly({ children, fallback = null }: ClientOnlyProps) {
return useHydrated() ? (
{children}
@@ -60,9 +55,6 @@ export function ClientOnly({ children, fallback = null }: ClientOnlyProps) {
* ```
* @returns True if the JS has been hydrated already, false otherwise.
*/
-/**
- * Return a boolean indicating whether client hydration has occurred.
- */
export function useHydrated(): boolean {
return React.useSyncExternalStore(
subscribe,
diff --git a/packages/react-router/src/HeadContent.tsx b/packages/react-router/src/HeadContent.tsx
index 617498c857..b86d706cd0 100644
--- a/packages/react-router/src/HeadContent.tsx
+++ b/packages/react-router/src/HeadContent.tsx
@@ -187,10 +187,6 @@ export const useTags = () => {
)
}
-/**
- * @description The `HeadContent` component is used to render meta tags, links, and scripts for the current route.
- * It should be rendered in the `
` of your document.
- */
/**
* Render route-managed head tags (title, meta, links, styles, head scripts).
* Place inside the document head of your app shell.
diff --git a/packages/react-router/src/Matches.tsx b/packages/react-router/src/Matches.tsx
index f08ee81172..0d64831d94 100644
--- a/packages/react-router/src/Matches.tsx
+++ b/packages/react-router/src/Matches.tsx
@@ -41,10 +41,6 @@ declare module '@tanstack/router-core' {
}
}
-/**
- * Internal component that renders the router's active match tree with
- * suspense, error, and not-found boundaries. Rendered by `RouterProvider`.
- */
/**
* Internal component that renders the router's active match tree with
* suspense, error, and not-found boundaries. Rendered by `RouterProvider`.
@@ -263,10 +259,6 @@ export function useMatches<
*
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useMatchesHook
*/
-/**
- * Read the full array of active route matches or select a derived subset
- * from the parent boundary up to (but not including) the current match.
- */
export function useParentMatches<
TRouter extends AnyRouter = RegisteredRouter,
TSelected = unknown,
@@ -289,10 +281,6 @@ export function useParentMatches<
} as any)
}
-/**
- * Read the array of active route matches that are children of the current
- * match (or selected parent) in the match tree.
- */
/**
* Read the array of active route matches that are children of the current
* match (or selected parent) in the match tree.
diff --git a/packages/react-router/src/RouterProvider.tsx b/packages/react-router/src/RouterProvider.tsx
index 4f4ba5155f..fd2aeb1eef 100644
--- a/packages/react-router/src/RouterProvider.tsx
+++ b/packages/react-router/src/RouterProvider.tsx
@@ -7,10 +7,6 @@ import type {
RouterOptions,
} from '@tanstack/router-core'
-/**
- * Low-level provider that places the router into React context and optionally
- * updates router options from props. Most apps should use `RouterProvider`.
- */
/**
* Low-level provider that places the router into React context and optionally
* updates router options from props. Most apps should use `RouterProvider`.
@@ -61,11 +57,6 @@ export function RouterContextProvider<
*
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRouterFunction
*/
-/**
- * Top-level component that renders the active route matches and provides the
- * router to the React tree via context. Accepts the same options as
- * `createRouter` via props to update the router instance.
- */
export function RouterProvider<
TRouter extends AnyRouter = RegisteredRouter,
TDehydrated extends Record = Record,
diff --git a/packages/react-router/src/Scripts.tsx b/packages/react-router/src/Scripts.tsx
index 3765e5790d..e7fced4d72 100644
--- a/packages/react-router/src/Scripts.tsx
+++ b/packages/react-router/src/Scripts.tsx
@@ -3,10 +3,6 @@ import { useRouterState } from './useRouterState'
import { useRouter } from './useRouter'
import type { RouterManagedTag } from '@tanstack/router-core'
-/**
- * Render body script tags collected from route matches and SSR manifests.
- * Should be placed near the end of the document body.
- */
/**
* Render body script tags collected from route matches and SSR manifests.
* Should be placed near the end of the document body.
diff --git a/packages/react-router/src/awaited.tsx b/packages/react-router/src/awaited.tsx
index df928e0a52..75ff49b8a8 100644
--- a/packages/react-router/src/awaited.tsx
+++ b/packages/react-router/src/awaited.tsx
@@ -7,7 +7,6 @@ export type AwaitOptions = {
promise: Promise
}
-/** Suspend until a deferred promise resolves/rejects and return its data. */
/** Suspend until a deferred promise resolves or rejects and return its data. */
export function useAwaited({
promise: _promise,
@@ -25,10 +24,6 @@ export function useAwaited({
return [promise[TSR_DEFERRED_PROMISE].data, promise]
}
-/**
- * Component that suspends on a deferred promise and renders its child with
- * the resolved value. Optionally provides a Suspense fallback.
- */
/**
* Component that suspends on a deferred promise and renders its child with
* the resolved value. Optionally provides a Suspense fallback.
diff --git a/packages/react-router/src/fileRoute.ts b/packages/react-router/src/fileRoute.ts
index 698a68df44..7af8877d1a 100644
--- a/packages/react-router/src/fileRoute.ts
+++ b/packages/react-router/src/fileRoute.ts
@@ -1,4 +1,3 @@
-/* eslint-disable react-hooks/rules-of-hooks */
import warning from 'tiny-warning'
import { createRoute } from './route'
@@ -47,24 +46,6 @@ import type { UseRouteContextRoute } from './useRouteContext'
* @returns A function that accepts Route options and returns a Route instance.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createFileRouteFunction
*/
-/**
- * Creates a file-based Route factory for a given path.
- *
- * Used by TanStack Router's file-based routing to associate a file with a
- * route. The returned function accepts standard route options. In normal usage
- * the `path` string is inserted and maintained by the `tsr` generator.
- *
- * @param path File path literal for the route (usually auto-generated).
- * @returns A function that accepts Route options and returns a Route instance.
- * @link https://tanstack.com/router/latest/docs/framework/react/api/router/createFileRouteFunction
- */
-/**
- * Creates a file-based Route factory for a given path.
- * Used by file-based routing to associate a file with a route. The returned
- * function accepts standard route options; the path is typically auto-managed
- * by the generator.
- * @link https://tanstack.com/router/latest/docs/framework/react/api/router/createFileRouteFunction
- */
export function createFileRoute<
TFilePath extends keyof FileRoutesByPath,
TParentRoute extends AnyRoute = FileRoutesByPath[TFilePath]['parentRoute'],
@@ -178,16 +159,6 @@ export class FileRoute<
}
}
-/**
- @deprecated It's recommended not to split loaders into separate files.
- Instead, place the loader function in the the main route file, inside the
- `createFileRoute('/path/to/file)(options)` options.
-*/
-/**
- @deprecated It's recommended not to split loaders into separate files.
- Instead, place the loader function in the the main route file, inside the
- `createFileRoute('/path/to/file)(options)` options.
-*/
/**
@deprecated It's recommended not to split loaders into separate files.
Instead, place the loader function in the main route file via `createFileRoute`.
@@ -304,22 +275,6 @@ export class LazyRoute {
* @returns A function that accepts lazy route options and returns a `LazyRoute`.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createLazyRouteFunction
*/
-/**
- * Creates a lazily-configurable code-based route stub by ID.
- *
- * Use this for code-splitting with code-based routes. The returned function
- * accepts only non-critical route options like `component`, `pendingComponent`,
- * `errorComponent`, and `notFoundComponent` which are applied when the route
- * is matched.
- *
- * @param id Route ID string literal to associate with the lazy route.
- * @returns A function that accepts lazy route options and returns a `LazyRoute`.
- * @link https://tanstack.com/router/latest/docs/framework/react/api/router/createLazyRouteFunction
- */
-/**
- * Create a lazily-configurable code-based route stub by ID.
- * @link https://tanstack.com/router/latest/docs/framework/react/api/router/createLazyRouteFunction
- */
export function createLazyRoute<
TRouter extends AnyRouter = RegisteredRouter,
TId extends string = string,
@@ -344,21 +299,6 @@ export function createLazyRoute<
* @returns A function that accepts lazy route options and returns a `LazyRoute`.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createLazyFileRouteFunction
*/
-/**
- * Creates a lazily-configurable file-based route stub by file path.
- *
- * Use this for code-splitting with file-based routes (eg. `.lazy.tsx` files).
- * The returned function accepts only non-critical route options like
- * `component`, `pendingComponent`, `errorComponent`, and `notFoundComponent`.
- *
- * @param id File path literal for the route file.
- * @returns A function that accepts lazy route options and returns a `LazyRoute`.
- * @link https://tanstack.com/router/latest/docs/framework/react/api/router/createLazyFileRouteFunction
- */
-/**
- * Create a lazily-configurable file-based route stub by file path.
- * @link https://tanstack.com/router/latest/docs/framework/react/api/router/createLazyFileRouteFunction
- */
export function createLazyFileRoute<
TFilePath extends keyof FileRoutesByPath,
TRoute extends FileRoutesByPath[TFilePath]['preLoaderRoute'],
diff --git a/packages/react-router/src/router.ts b/packages/react-router/src/router.ts
index 2303137105..b3a20910f8 100644
--- a/packages/react-router/src/router.ts
+++ b/packages/react-router/src/router.ts
@@ -88,11 +88,6 @@ declare module '@tanstack/router-core' {
* @returns A Router instance to be provided to `RouterProvider`.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRouterFunction
*/
-/**
- * Create a new React router instance from `RouterOptions`.
- * Pass the resulting router to `RouterProvider`.
- * @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRouterFunction
- */
export const createRouter: CreateRouterFn = (options) => {
return new Router(options)
}
diff --git a/packages/react-router/src/useBlocker.tsx b/packages/react-router/src/useBlocker.tsx
index 6ac7ba3dcf..f7badec886 100644
--- a/packages/react-router/src/useBlocker.tsx
+++ b/packages/react-router/src/useBlocker.tsx
@@ -140,10 +140,6 @@ export function useBlocker<
*/
export function useBlocker(blockerFnOrOpts?: LegacyBlockerOpts): BlockerResolver
-/**
- * @deprecated Use the UseBlockerOpts object syntax instead
- */
-export function useBlocker(
blockerFn?: LegacyBlockerFn,
condition?: boolean | any,
): BlockerResolver
diff --git a/packages/react-router/src/useLoaderData.tsx b/packages/react-router/src/useLoaderData.tsx
index bc4e6dd728..eb82a40461 100644
--- a/packages/react-router/src/useLoaderData.tsx
+++ b/packages/react-router/src/useLoaderData.tsx
@@ -65,10 +65,6 @@ export type UseLoaderDataRoute = <
* @returns The loader data (or selected value) for the matched route.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLoaderDataHook
*/
-/**
- * Read and select the current route's loader data with type‑safety.
- * @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLoaderDataHook
- */
export function useLoaderData<
TRouter extends AnyRouter = RegisteredRouter,
const TFrom extends string | undefined = undefined,
diff --git a/packages/react-router/src/useLoaderDeps.tsx b/packages/react-router/src/useLoaderDeps.tsx
index cc79b7ea71..bab8cbdf36 100644
--- a/packages/react-router/src/useLoaderDeps.tsx
+++ b/packages/react-router/src/useLoaderDeps.tsx
@@ -51,10 +51,6 @@ export type UseLoaderDepsRoute = <
* @returns The loader deps (or selected value) for the matched route.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLoaderDepsHook
*/
-/**
- * Read and select the current route's loader dependencies object.
- * @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLoaderDepsHook
- */
export function useLoaderDeps<
TRouter extends AnyRouter = RegisteredRouter,
const TFrom extends string | undefined = undefined,
diff --git a/packages/react-router/src/useLocation.tsx b/packages/react-router/src/useLocation.tsx
index a0804e1347..f0bcc8fffc 100644
--- a/packages/react-router/src/useLocation.tsx
+++ b/packages/react-router/src/useLocation.tsx
@@ -37,11 +37,6 @@ export type UseLocationResult<
* @returns The current location (or selected value).
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLocationHook
*/
-/**
- * Read the current location from the router state with optional selection.
- * Useful for subscribing to just the pieces of location you care about.
- * @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLocationHook
- */
export function useLocation<
TRouter extends AnyRouter = RegisteredRouter,
TSelected = unknown,
diff --git a/packages/react-router/src/useParams.tsx b/packages/react-router/src/useParams.tsx
index 1785440410..444eee7a41 100644
--- a/packages/react-router/src/useParams.tsx
+++ b/packages/react-router/src/useParams.tsx
@@ -73,10 +73,6 @@ export type UseParamsRoute = <
* @returns The params object (or selected value) for the matched route.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useParamsHook
*/
-/**
- * Access the current route's path parameters with type-safety.
- * @link https://tanstack.com/router/latest/docs/framework/react/api/router/useParamsHook
- */
export function useParams<
TRouter extends AnyRouter = RegisteredRouter,
const TFrom extends string | undefined = undefined,
diff --git a/packages/react-router/src/useRouter.tsx b/packages/react-router/src/useRouter.tsx
index c492211b13..abfefecaa3 100644
--- a/packages/react-router/src/useRouter.tsx
+++ b/packages/react-router/src/useRouter.tsx
@@ -13,11 +13,6 @@ import type { AnyRouter, RegisteredRouter } from '@tanstack/router-core'
* @returns The registered router instance.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useRouterHook
*/
-/**
- * Access the current TanStack Router instance from React context.
- * Must be used within a `RouterProvider`.
- * @link https://tanstack.com/router/latest/docs/framework/react/api/router/useRouterHook
- */
export function useRouter(opts?: {
warn?: boolean
}): TRouter {
diff --git a/packages/react-router/src/useRouterState.tsx b/packages/react-router/src/useRouterState.tsx
index e590604009..08a7c7b9b8 100644
--- a/packages/react-router/src/useRouterState.tsx
+++ b/packages/react-router/src/useRouterState.tsx
@@ -40,11 +40,6 @@ export type UseRouterStateResult<
* @returns The selected router state (or the full state by default).
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useRouterStateHook
*/
-/**
- * Subscribe to the router's state store with optional selection and
- * structural sharing for render optimization.
- * @link https://tanstack.com/router/latest/docs/framework/react/api/router/useRouterStateHook
- */
export function useRouterState<
TRouter extends AnyRouter = RegisteredRouter,
TSelected = unknown,
diff --git a/packages/react-router/src/useSearch.tsx b/packages/react-router/src/useSearch.tsx
index b6fea2987a..46b6e51642 100644
--- a/packages/react-router/src/useSearch.tsx
+++ b/packages/react-router/src/useSearch.tsx
@@ -73,10 +73,6 @@ export type UseSearchRoute = <
* @returns The search object (or selected value) for the matched route.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useSearchHook
*/
-/**
- * Read and select the current route's search parameters with type-safety.
- * @link https://tanstack.com/router/latest/docs/framework/react/api/router/useSearchHook
- */
export function useSearch<
TRouter extends AnyRouter = RegisteredRouter,
const TFrom extends string | undefined = undefined,
diff --git a/packages/router-core/src/Matches.ts b/packages/router-core/src/Matches.ts
index 852d186b67..486e86e3ec 100644
--- a/packages/router-core/src/Matches.ts
+++ b/packages/router-core/src/Matches.ts
@@ -256,12 +256,6 @@ export type MakeRouteMatchUnion<
>
: never
-/**
- * The `MatchRouteOptions` type is used to describe the options that can be used when matching a route.
- *
- * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/MatchRouteOptionsType#matchrouteoptions-type)
- */
-export interface MatchRouteOptions {
/**
* If `true`, will match against pending location instead of the current location.
*
diff --git a/packages/router-core/src/new-process-route-tree.ts b/packages/router-core/src/new-process-route-tree.ts
index 2d3b41cc11..17edcae3d0 100644
--- a/packages/router-core/src/new-process-route-tree.ts
+++ b/packages/router-core/src/new-process-route-tree.ts
@@ -35,23 +35,6 @@ type ParsedSegment = Uint16Array & {
5: number
}
-/**
- * Populates the `output` array with the parsed representation of the given `segment` string.
- *
- * Usage:
- * ```ts
- * let output
- * let cursor = 0
- * while (cursor < path.length) {
- * output = parseSegment(path, cursor, output)
- * const end = output[5]
- * cursor = end + 1
- * ```
- *
- * `output` is stored outside to avoid allocations during repeated calls. It doesn't need to be typed
- * or initialized, it will be done automatically.
- */
-export function parseSegment(
/** The full path string containing the segment. */
path: string,
/** The starting index of the segment within the path. */
@@ -150,16 +133,6 @@ export function parseSegment(
return output as ParsedSegment
}
-/**
- * Recursively parses the segments of the given route tree and populates a segment trie.
- *
- * @param data A reusable Uint16Array for parsing segments. (non important, we're just avoiding allocations)
- * @param route The current route to parse.
- * @param start The starting index for parsing within the route's full path.
- * @param node The current segment node in the trie to populate.
- * @param onRoute Callback invoked for each route processed.
- */
-function parseSegments(
defaultCaseSensitive: boolean,
data: Uint16Array,
route: TRouteLike,
@@ -424,11 +397,6 @@ function createStaticNode(
}
}
-/**
- * Keys must be declared in the same order as in `SegmentNode` type,
- * to ensure they are represented as the same object class in the engine.
- */
-function createDynamicNode(
kind:
| typeof SEGMENT_TYPE_PARAM
| typeof SEGMENT_TYPE_WILDCARD
@@ -561,10 +529,6 @@ export function processRouteMasks<
>(1000)
}
-/**
- * Take an arbitrary list of routes, create a tree from them (if it hasn't been created already), and match a path against it.
- */
-export function findFlatMatch>(
/** The path to match. */
path: string,
/** The `processedTree` returned by the initial `processRouteTree` call. */
@@ -578,10 +542,6 @@ export function findFlatMatch>(
return result
}
-/**
- * @deprecated keep until v2 so that `router.matchRoute` can keep not caring about the actual route tree
- */
-export function findSingleMatch(
from: string,
caseSensitive: boolean,
fuzzy: boolean,
@@ -638,11 +598,6 @@ export function trimPathRight(path: string) {
return path === '/' ? path : path.replace(/\/{1,}$/, '')
}
-/**
- * Processes a route tree into a segment trie for efficient path matching.
- * Also builds lookup maps for routes by ID and by trimmed full path.
- */
-export function processRouteTree<
TRouteLike extends Extract & { id: string },
>(
/** The root of the route tree to process. */
diff --git a/packages/router-core/src/path.ts b/packages/router-core/src/path.ts
index 484f797307..c8ed96fa02 100644
--- a/packages/router-core/src/path.ts
+++ b/packages/router-core/src/path.ts
@@ -8,7 +8,6 @@ import {
} from './new-process-route-tree'
import type { LRUCache } from './lru-cache'
-/** Join path segments, cleaning duplicate slashes between parts. */
/** Join path segments, cleaning duplicate slashes between parts. */
export function joinPaths(paths: Array) {
return cleanPath(
@@ -20,27 +19,23 @@ export function joinPaths(paths: Array) {
)
}
-/** Remove repeated slashes from a path string. */
/** Remove repeated slashes from a path string. */
export function cleanPath(path: string) {
// remove double slashes
return path.replace(/\/{2,}/g, '/')
}
-/** Trim leading slashes (except preserving root '/'). */
/** Trim leading slashes (except preserving root '/'). */
export function trimPathLeft(path: string) {
return path === '/' ? path : path.replace(/^\/{1,}/, '')
}
-/** Trim trailing slashes (except preserving root '/'). */
/** Trim trailing slashes (except preserving root '/'). */
export function trimPathRight(path: string) {
const len = path.length
return len > 1 && path[len - 1] === '/' ? path.replace(/\/{1,}$/, '') : path
}
-/** Trim both leading and trailing slashes. */
/** Trim both leading and trailing slashes. */
export function trimPath(path: string) {
return trimPathRight(trimPathLeft(path))
@@ -58,15 +53,6 @@ export function removeTrailingSlash(value: string, basepath: string): string {
// see the usage in the isActive under useLinkProps
// /sample/path1 = /sample/path1/
// /sample/path1/some <> /sample/path1
-/**
- * Compare two pathnames for exact equality after normalizing trailing slashes
- * relative to the provided `basepath`.
- */
-/**
- * Compare two pathnames for exact equality after normalizing trailing slashes
- * relative to the provided `basepath`.
- */
-export function exactPathTest(
pathName1: string,
pathName2: string,
basepath: string,
@@ -110,11 +96,6 @@ interface ResolvePathOptions {
cache?: LRUCache
}
-/**
- * Resolve a destination path against a base, honoring trailing-slash policy
- * and supporting relative segments (`.`/`..`) and absolute `to` values.
- */
-export function resolvePath({
base,
to,
trailingSlash = 'never',
@@ -241,10 +222,6 @@ function encodeParam(
* - Encodes params safely (configurable allowed characters)
* - Supports `{-$optional}` segments, `{prefix{$id}suffix}` and `{$}` wildcards
*/
-/**
- * Interpolate params and wildcards into a route path template.
- * Encodes safely and supports optional params and custom decode char maps.
- */
export function interpolatePath({
path,
params,
diff --git a/packages/router-core/src/qss.ts b/packages/router-core/src/qss.ts
index 5b1b733324..66c05f6b9c 100644
--- a/packages/router-core/src/qss.ts
+++ b/packages/router-core/src/qss.ts
@@ -22,7 +22,6 @@
* // Expected output: "token=foo&key=value"
* ```
*/
-/** Encode a plain object into a URL query string using URLSearchParams. */
export function encode(
obj: Record,
stringify: (value: any) => string = String,
@@ -47,7 +46,6 @@ export function encode(
* // Example input: toValue("123")
* // Expected output: 123
*/
-/** Convert a string into a primitive boolean/number when possible. */
function toValue(str: unknown) {
if (!str) return ''
@@ -56,15 +54,6 @@ function toValue(str: unknown) {
return +str * 0 === 0 && +str + '' === str ? +str : str
}
-/**
- * Decodes a query string into an object.
- * @param str - The query string to decode.
- * @returns The decoded key-value pairs in an object format.
- * @example
- * // Example input: decode("token=foo&key=value")
- * // Expected output: { "token": "foo", "key": "value" }
- */
-/** Decode a URL query string into an object with basic type coercion. */
export function decode(str: any): any {
const searchParams = new URLSearchParams(str)
diff --git a/packages/router-core/src/redirect.ts b/packages/router-core/src/redirect.ts
index 61e1e07ff1..d2093a0eb6 100644
--- a/packages/router-core/src/redirect.ts
+++ b/packages/router-core/src/redirect.ts
@@ -71,10 +71,6 @@ export type ResolvedRedirect<
* @returns A Response augmented with router navigation options.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/redirectFunction
*/
-/**
- * Create a redirect Response understood by TanStack Router.
- * Use inside loaders/beforeLoad or server handlers to trigger navigation.
- */
export function redirect<
TRouter extends AnyRouter = RegisteredRouter,
const TTo extends string | undefined = '.',
diff --git a/packages/router-core/src/router.ts b/packages/router-core/src/router.ts
index feabe46be3..f73310c912 100644
--- a/packages/router-core/src/router.ts
+++ b/packages/router-core/src/router.ts
@@ -816,11 +816,6 @@ export const trailingSlashOptions = {
export type TrailingSlashOption =
(typeof trailingSlashOptions)[keyof typeof trailingSlashOptions]
-/**
- * Compute whether path, href or hash changed between previous and current
- * resolved locations in router state.
- */
-export function getLocationChangeInfo(routerState: {
resolvedLocation?: ParsedLocation
location: ParsedLocation
}) {
@@ -856,16 +851,6 @@ export type CreateRouterFn = <
TDehydrated
>
-/**
- * Core, framework-agnostic router engine that powers TanStack Router.
- *
- * Provides navigation, matching, loading, preloading, caching and event APIs
- * used by framework adapters (React/Solid). Prefer framework helpers like
- * `createRouter` in app code.
- *
- * @link https://tanstack.com/router/latest/docs/framework/react/api/router/RouterType
- */
-export class RouterCore<
in out TRouteTree extends AnyRoute,
in out TTrailingSlashOption extends TrailingSlashOption,
in out TDefaultStructuralSharingOption extends boolean,
@@ -2580,11 +2565,6 @@ function comparePaths(a: string, b: string) {
return normalize(a) === normalize(b)
}
-/**
- * Lazily import a module function and forward arguments to it, retaining
- * parameter and return types for the selected export key.
- */
-export function lazyFn<
T extends Record) => any>,
TKey extends keyof T = 'default',
>(fn: () => Promise, key?: TKey) {
@@ -2642,11 +2622,6 @@ function validateSearch(validateSearch: AnyValidator, input: unknown): unknown {
return {}
}
-/**
- * Build the matched route chain and extract params for a pathname.
- * Falls back to the root route if no specific route is found.
- */
-export function getMatchedRoutes({
pathname,
routesById,
processedTree,
diff --git a/packages/router-core/src/scroll-restoration.ts b/packages/router-core/src/scroll-restoration.ts
index b48000c8c1..e7da3e52eb 100644
--- a/packages/router-core/src/scroll-restoration.ts
+++ b/packages/router-core/src/scroll-restoration.ts
@@ -73,8 +73,6 @@ function createScrollRestorationCache(): ScrollRestorationCache | null {
}
}
-/** In-memory handle to the persisted scroll restoration cache. */
-/** In-memory handle to the persisted scroll restoration cache. */
/** In-memory handle to the persisted scroll restoration cache. */
export const scrollRestorationCache = createScrollRestorationCache()
@@ -85,12 +83,6 @@ export const scrollRestorationCache = createScrollRestorationCache()
* The `location.href` is used as a fallback to support the use case where the location state is not available like the initial render.
*/
-/**
- * Default scroll restoration cache key: location state key or full href.
- */
-/**
- * Default scroll restoration cache key: location state key or full href.
- */
/**
* Default scroll restoration cache key: location state key or full href.
*/
@@ -117,13 +109,6 @@ let ignoreScroll = false
// unless they are passed in as arguments. Why? Because we need to be able to
// toString() it into a script tag to execute as early as possible in the browser
// during SSR. Additionally, we also call it from within the router lifecycle
-/**
- * Restore scroll positions for window/elements based on cached entries.
- */
-/**
- * Restore scroll positions for window/elements based on cached entries.
- */
-export function restoreScroll({
storageKey,
key,
behavior,
@@ -389,14 +374,6 @@ export function setupScrollRestoration(router: AnyRouter, force?: boolean) {
* Provides hash scrolling for programmatic navigation when default browser handling is prevented.
* @param router The router instance containing current location and state
*/
-/**
- * @private
- * Handles hash-based scrolling after navigation completes.
- * To be used in framework-specific components during the onResolved event.
- *
- * Provides hash scrolling for programmatic navigation when default browser handling is prevented.
- * @param router The router instance containing current location and state
- */
/**
* @private
* Handles hash-based scrolling after navigation completes.
diff --git a/packages/router-core/src/searchMiddleware.ts b/packages/router-core/src/searchMiddleware.ts
index 32d672348e..e90d453350 100644
--- a/packages/router-core/src/searchMiddleware.ts
+++ b/packages/router-core/src/searchMiddleware.ts
@@ -13,9 +13,6 @@ import type { IsRequiredParams } from './link'
* @returns A search middleware suitable for route `search.middlewares`.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/retainSearchParamsFunction
*/
-/**
- * Retain specified search params across navigations by merging prior values.
- */
export function retainSearchParams(
keys: Array | true,
): SearchMiddleware {
@@ -44,9 +41,6 @@ export function retainSearchParams(
* @returns A search middleware suitable for route `search.middlewares`.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/stripSearchParamsFunction
*/
-/**
- * Remove optional/default-valued search params from navigations.
- */
export function stripSearchParams<
TSearchSchema,
TOptionalProps = PickOptional>,
diff --git a/packages/router-core/src/searchParams.ts b/packages/router-core/src/searchParams.ts
index ad9957aed9..740d36441c 100644
--- a/packages/router-core/src/searchParams.ts
+++ b/packages/router-core/src/searchParams.ts
@@ -1,8 +1,6 @@
import { decode, encode } from './qss'
import type { AnySchema } from './validators'
-/** Default `parseSearch` that strips leading '?' and JSON-parses values. */
-/** Default `parseSearch` that strips leading '?' and JSON-parses values. */
/** Default `parseSearch` that strips leading '?' and JSON-parses values. */
export const defaultParseSearch = parseSearchWith(JSON.parse)
/** Default `stringifySearch` using JSON.stringify for complex values. */
@@ -21,7 +19,6 @@ export const defaultStringifySearch = stringifySearchWith(
* @returns A `parseSearch` function compatible with `Router` options.
* @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization
*/
-/** Build a parseSearch function using a provided JSON-like parser. */
export function parseSearchWith(parser: (str: string) => any) {
return (searchStr: string): AnySchema => {
if (searchStr[0] === '?') {
@@ -58,7 +55,6 @@ export function parseSearchWith(parser: (str: string) => any) {
* @returns A `stringifySearch` function compatible with `Router` options.
* @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization
*/
-/** Build a stringifySearch function using a provided serializer/parser. */
export function stringifySearchWith(
stringify: (search: any) => string,
parser?: (str: string) => any,
diff --git a/packages/solid-router/src/useBlocker.tsx b/packages/solid-router/src/useBlocker.tsx
index 61b942de43..6373d057a8 100644
--- a/packages/solid-router/src/useBlocker.tsx
+++ b/packages/solid-router/src/useBlocker.tsx
@@ -148,10 +148,6 @@ export function useBlocker(
blockerFnOrOpts?: LegacyBlockerOpts,
): Solid.Accessor
-/**
- * @deprecated Use the UseBlockerOpts object syntax instead
- */
-export function useBlocker(
blockerFn?: LegacyBlockerFn,
condition?: boolean | any,
): Solid.Accessor
diff --git a/packages/start-server-core/src/session.ts b/packages/start-server-core/src/session.ts
index 8617cf8ae7..9b5f1f7b4e 100644
--- a/packages/start-server-core/src/session.ts
+++ b/packages/start-server-core/src/session.ts
@@ -9,10 +9,6 @@ type EncryptionAlgorithm = 'aes-128-ctr' | 'aes-256-cbc'
type IntegrityAlgorithm = 'sha256'
/** @internal */
type _Algorithm = EncryptionAlgorithm | IntegrityAlgorithm
-/**
- * Options for customizing the key derivation algorithm used to generate encryption and integrity verification keys as well as the algorithms and salt sizes used.
- */
-type SealOptions = Readonly<{
/** Encryption step options. */
encryption: SealOptionsSub
/** Integrity step options. */