import { StructuralSharingOption, ValidateSelected } from './structuralSharing.js'; import { AnyRouter, RegisteredRouter, ResolveUseSearch, StrictOrFrom, ThrowConstraint, ThrowOrOptional, UseSearchResult } from '@tanstack/router-core'; export interface UseSearchBaseOptions { select?: (state: ResolveUseSearch) => ValidateSelected; shouldThrow?: TThrow; } export type UseSearchOptions = StrictOrFrom & UseSearchBaseOptions & StructuralSharingOption; export type UseSearchRoute = (opts?: UseSearchBaseOptions & StructuralSharingOption) => UseSearchResult; /** * Read and select the current route's search parameters with type-safety. * * Options: * - `from`/`strict`: Control which route's search is read and how strictly it's typed * - `select`: Map the search object to a derived value for render optimization * - `structuralSharing`: Enable structural sharing for stable references * - `shouldThrow`: Throw when the route is not found (strict contexts) * * @returns The search object (or selected value) for the matched route. * @link https://tanstack.com/router/latest/docs/framework/react/api/router/useSearchHook */ export declare function useSearch(opts: UseSearchOptions, TSelected, TStructuralSharing>): ThrowOrOptional, TThrow>;