@@ -46,6 +46,7 @@ import type {
46
46
} from '@tanstack/history'
47
47
import type {
48
48
Awaitable ,
49
+ Constrain ,
49
50
ControlledPromise ,
50
51
NoInfer ,
51
52
NonNullableUpdater ,
@@ -84,7 +85,10 @@ import type { Manifest } from './manifest'
84
85
import type { AnySchema , AnyValidator } from './validators'
85
86
import type { NavigateOptions , ResolveRelativePath , ToOptions } from './link'
86
87
import type { NotFoundError } from './not-found'
87
- import type { AnySerializationAdapter } from './ssr/serializer/transformer'
88
+ import type {
89
+ AnySerializationAdapter ,
90
+ ValidateSerializableInput ,
91
+ } from './ssr/serializer/transformer'
88
92
import type { AnyRouterConfig } from './config'
89
93
90
94
export type ControllablePromise < T = any > = Promise < T > & {
@@ -122,7 +126,7 @@ export interface RouterOptions<
122
126
TTrailingSlashOption extends TrailingSlashOption ,
123
127
TDefaultStructuralSharingOption extends boolean = false ,
124
128
TRouterHistory extends RouterHistory = RouterHistory ,
125
- TDehydrated extends Record < string , any > = Record < string , any > ,
129
+ TDehydrated = undefined ,
126
130
> extends RouterOptionsExtensions {
127
131
/**
128
132
* The history object that will be used to manage the browser history.
@@ -290,7 +294,10 @@ export interface RouterOptions<
290
294
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#dehydrate-method)
291
295
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/external-data-loading#critical-dehydrationhydration)
292
296
*/
293
- dehydrate ?: ( ) => Awaitable < TDehydrated >
297
+ dehydrate ?: ( ) => Constrain <
298
+ TDehydrated ,
299
+ ValidateSerializableInput < Register , TDehydrated >
300
+ >
294
301
/**
295
302
* A function that will be called when the router is hydrated.
296
303
*
0 commit comments