Skip to content

docs: update RouteMatch type to include more properties based on Matches.d.ts #4894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/router/framework/react/api/router/RouteMatchType.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ The `RouteMatch` type represents a route match in TanStack Router.
interface RouteMatch {
id: string
routeId: string
fullPath: string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is typed

index: number
pathname: string
params: Route['allParams']
status: 'pending' | 'success' | 'error' | 'redirected' | 'notFound'
Expand All @@ -24,7 +26,13 @@ interface RouteMatch {
search: Route['fullSearchSchema']
fetchedAt: number
abortController: AbortController
cause: 'enter' | 'stay'
cause: 'preload' | 'enter' | 'stay'
fetchCount: number
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also not public

preload: boolean
invalid: boolean
headers?: Record<string, string>
globalNotFound?: boolean
ssr?: boolean | 'data-only'
displayPendingPromise?: Promise<void>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not a public API

}
```