Upgrading to 0.24.0
Breaking changes
Public type boundaries
Route, URL, and plugin implementation details are removed from their public types and package exports. Applications using only factory methods need no changes. If you imported the old helpers, update these annotations:
| Removed export | Replacement |
|---|---|
Routes | readonly Route[] |
GenericRoute | Route, or typeof yourRoute |
EmptyRouterPlugin | Infer from createRouterPlugin({}) |
PluginBeforeRouteHook, PluginAfterRouteHook, PluginErrorHook, PluginErrorHookContext, PluginRouteHooks, AddPluginErrorHook | Infer callbacks through the plugin's registration methods |
ToUrl, UrlParamsReading, UrlParamsWriting | Infer from createUrl, url.parse, and url.stringify |
WithHooks, isWithHooks | Register hooks through route methods |
IS_URL_SYMBOL, isUrlWithSchema | Keep the object returned by createUrl; do not inspect its internal marker |
The public route type no longer exposes its internal depth. Do not construct route, URL, or plugin objects by copying their internal fields; use createRoute, createUrl, and createRouterPlugin.