Route Type Registration
Register your route tree for global type inference:File-Based Routes
Generate type-safe routes from your file structure:- Type definitions for all routes
- Global route type registration
- Autocomplete for paths and params
Route File
Type-Safe Parameters
Path Parameters
Path params are automatically inferred:Parsed Parameters
Transform params with type safety:Search Parameters
Define search param types with validators:Type-Safe Navigation
Link Component
Links are fully type-checked:Navigate Hook
Programmatic navigation is type-safe:From Parameter
Specify source route for relative navigation:Type-Safe Data Access
Loader Data
Loader return types are inferred:Context
Route context is fully typed:Strict Mode
Strict Params
Enable strict parameter typing:Strict Search
Strictly type search parameters:validateSearch are allowed.
Type Inference
Route by ID
Access route types by ID:Route by Path
Access route types by path:All Params
Get union of all route params:Router Context Type
Define context type for dependency injection:Type Helpers
ParsePathParams
Extract param types from path pattern:ResolveFullSearchSchema
Resolve complete search schema including parent routes:MakeRouteMatch
Create a route match type:Generic Components
Build reusable type-safe components:TSConfig Setup
Enable strict mode for best type safety:Type Errors
Common Issues
Missing Router Registration
Wrong From Parameter
Invalid Navigation
Type Generation
Manual Generation
Watch Mode
In Package Scripts
Best Practices
Always Register Router Type
Always Register Router Type
Register your router type globally for complete type inference across your app.
Use Validators for Search Params
Use Validators for Search Params
Define search parameters with Zod, Valibot, or ArkType for runtime validation and type safety.
Enable Strict TypeScript
Enable Strict TypeScript
Use
strict: true and strictNullChecks: true in tsconfig.json for maximum type safety.Specify 'from' Parameter
Specify 'from' Parameter
Always specify
from in hooks for route-specific types instead of loose union types.Parse Path Parameters
Parse Path Parameters
Transform path params from strings to typed values using
params.parse for better DX.Next Steps
Search Params
Type-safe search parameter validation
Path Params
Type-safe path parameter parsing
Loaders
Type-safe data loading
Routes
Configure route type inference