Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions packages/router-core/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import type {
} from '@tanstack/history'
import type {
Awaitable,
Constrain,
ControlledPromise,
NoInfer,
NonNullableUpdater,
Expand Down Expand Up @@ -84,7 +85,10 @@ import type { Manifest } from './manifest'
import type { AnySchema, AnyValidator } from './validators'
import type { NavigateOptions, ResolveRelativePath, ToOptions } from './link'
import type { NotFoundError } from './not-found'
import type { AnySerializationAdapter } from './ssr/serializer/transformer'
import type {
AnySerializationAdapter,
ValidateSerializableInput,
} from './ssr/serializer/transformer'
import type { AnyRouterConfig } from './config'

export type ControllablePromise<T = any> = Promise<T> & {
Expand Down Expand Up @@ -122,7 +126,7 @@ export interface RouterOptions<
TTrailingSlashOption extends TrailingSlashOption,
TDefaultStructuralSharingOption extends boolean = false,
TRouterHistory extends RouterHistory = RouterHistory,
TDehydrated extends Record<string, any> = Record<string, any>,
TDehydrated = undefined,
> extends RouterOptionsExtensions {
/**
* The history object that will be used to manage the browser history.
Expand Down Expand Up @@ -290,7 +294,10 @@ export interface RouterOptions<
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#dehydrate-method)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/external-data-loading#critical-dehydrationhydration)
*/
dehydrate?: () => Awaitable<TDehydrated>
dehydrate?: () => Constrain<
TDehydrated,
ValidateSerializableInput<Register, TDehydrated>
>
/**
* A function that will be called when the router is hydrated.
*
Expand Down
Loading