import type { AnyRouter, Constrain, InferFrom, InferMaskFrom, InferMaskTo, InferSelected, InferShouldThrow, InferStrict, InferTo, RegisteredRouter, } from '@tanstack/router-core'; import type { LinkComponentProps } from './linkTypes'; import type { UseParamsOptions, UseSearchOptions } from './routeHookTypes'; export type ValidateLinkOptions< TRouter extends AnyRouter = RegisteredRouter, TOptions = unknown, TDefaultFrom extends string = string, TComp = 'a', > = Constrain< TOptions, LinkComponentProps< TComp, TRouter, InferFrom, InferTo, InferMaskFrom, InferMaskTo > >; /** @private */ export type InferStructuralSharing = TOptions extends { structuralSharing: infer TStructuralSharing; } ? TStructuralSharing : unknown; export type ValidateUseSearchOptions< TOptions, TRouter extends AnyRouter = RegisteredRouter, > = Constrain< TOptions, UseSearchOptions< TRouter, InferFrom, InferStrict, InferShouldThrow, InferSelected, InferStructuralSharing > >; export type ValidateUseParamsOptions< TOptions, TRouter extends AnyRouter = RegisteredRouter, > = Constrain< TOptions, UseParamsOptions< TRouter, InferFrom, InferStrict, InferShouldThrow, InferSelected, InferStructuralSharing > >; export type ValidateLinkOptionsArray< TRouter extends AnyRouter = RegisteredRouter, TOptions extends ReadonlyArray = ReadonlyArray, TDefaultFrom extends string = string, TComp = 'a', > = { [K in keyof TOptions]: ValidateLinkOptions; };