@tanstack/router-core 1.121.0 → 1.121.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@ import { Store } from '@tanstack/store';
2
2
  import { SearchParser, SearchSerializer } from './searchParams.cjs';
3
3
  import { AnyRedirect, ResolvedRedirect } from './redirect.cjs';
4
4
  import { HistoryLocation, HistoryState, ParsedHistoryState, RouterHistory } from '@tanstack/history';
5
- import { ControlledPromise, NoInfer, NonNullableUpdater, PickAsRequired, Updater } from './utils.cjs';
5
+ import { Awaitable, ControlledPromise, NoInfer, NonNullableUpdater, PickAsRequired, Updater } from './utils.cjs';
6
6
  import { ParsedLocation } from './location.cjs';
7
7
  import { DeferredPromiseState } from './defer.cjs';
8
8
  import { AnyContext, AnyRoute, AnyRouteWithContext, MakeRemountDepsOptionsUnion, RouteMask } from './route.cjs';
@@ -206,12 +206,10 @@ export interface RouterOptions<TRouteTree extends AnyRoute, TTrailingSlashOption
206
206
  /**
207
207
  * A function that will be called when the router is hydrated.
208
208
  *
209
- * The return value of this function will be serialized and stored in the router's dehydrated state.
210
- *
211
209
  * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#hydrate-method)
212
210
  * @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/external-data-loading#critical-dehydrationhydration)
213
211
  */
214
- hydrate?: (dehydrated: TDehydrated) => void;
212
+ hydrate?: (dehydrated: TDehydrated) => Awaitable<void>;
215
213
  /**
216
214
  * An array of route masks that will be used to mask routes in the route tree.
217
215
  *
@@ -2,7 +2,7 @@ import { Store } from '@tanstack/store';
2
2
  import { SearchParser, SearchSerializer } from './searchParams.js';
3
3
  import { AnyRedirect, ResolvedRedirect } from './redirect.js';
4
4
  import { HistoryLocation, HistoryState, ParsedHistoryState, RouterHistory } from '@tanstack/history';
5
- import { ControlledPromise, NoInfer, NonNullableUpdater, PickAsRequired, Updater } from './utils.js';
5
+ import { Awaitable, ControlledPromise, NoInfer, NonNullableUpdater, PickAsRequired, Updater } from './utils.js';
6
6
  import { ParsedLocation } from './location.js';
7
7
  import { DeferredPromiseState } from './defer.js';
8
8
  import { AnyContext, AnyRoute, AnyRouteWithContext, MakeRemountDepsOptionsUnion, RouteMask } from './route.js';
@@ -206,12 +206,10 @@ export interface RouterOptions<TRouteTree extends AnyRoute, TTrailingSlashOption
206
206
  /**
207
207
  * A function that will be called when the router is hydrated.
208
208
  *
209
- * The return value of this function will be serialized and stored in the router's dehydrated state.
210
- *
211
209
  * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#hydrate-method)
212
210
  * @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/external-data-loading#critical-dehydrationhydration)
213
211
  */
214
- hydrate?: (dehydrated: TDehydrated) => void;
212
+ hydrate?: (dehydrated: TDehydrated) => Awaitable<void>;
215
213
  /**
216
214
  * An array of route masks that will be used to mask routes in the route tree.
217
215
  *