TypeScript type definitions for Real-Router ecosystem. Provides shared types used by all @real-router/* packages.
Installation
This package is automatically installed as a dependency of @real-router/core. Direct installation is only needed for advanced use cases.
npminstall @real-router/types
Usage
// Most users should import types from @real-router/coreimporttype{ Router, State, Params }from"@real-router/core";// Direct import is available for type-only scenariosimporttype{ State, Params, NavigationOptions }from"@real-router/types";
Exported Types
Core Router Types
Type
Description
Router<D>
Full router interface with navigation, lifecycle, and plugin management
Navigator
Minimal safe subset of Router methods for passing to components
State<P>
Current route state with name, params, and metadata
Params
Route parameters object (string key-value pairs)
NavigationOptions
Options for navigation (e.g., replace, skipGuards)