Files
med-notes/.pnpm-store/v10/files/90/70682b754b926d0f6d0322c0fc20b2ceffb0b5bc2de5d1a7117026e3df8bb99661eefc2e226c9139fd2be10b11def8fdffaa7c297881f1cf8109a63c0e46e1
2025-05-09 05:30:08 +02:00

8 lines
906 B
Plaintext

import { StructuralSharingOption, ValidateSelected } from './structuralSharing.js';
import { AnyRouter, RegisteredRouter, RouterState } from '@tanstack/router-core';
export interface UseLocationBaseOptions<TRouter extends AnyRouter, TSelected, TStructuralSharing extends boolean = boolean> {
select?: (state: RouterState<TRouter['routeTree']>['location']) => ValidateSelected<TRouter, TSelected, TStructuralSharing>;
}
export type UseLocationResult<TRouter extends AnyRouter, TSelected> = unknown extends TSelected ? RouterState<TRouter['routeTree']>['location'] : TSelected;
export declare function useLocation<TRouter extends AnyRouter = RegisteredRouter, TSelected = unknown, TStructuralSharing extends boolean = boolean>(opts?: UseLocationBaseOptions<TRouter, TSelected, TStructuralSharing> & StructuralSharingOption<TRouter, TSelected, TStructuralSharing>): UseLocationResult<TRouter, TSelected>;