/** * Synchronous navigation for tests — sets the URL and updates the * location signal without going through the async navigate pipeline * or view transitions. * * @param {string} href - Full or absolute URL * @param {{ replace?: boolean }} [options] * @url https://pota.quack.uy/use/location/navigateSync */ export function navigateSync(href: string, options?: { replace?: boolean; }): void; /** * Adds event listeners for client-side navigation. Only adds * listeners once to prevent duplicate handlers * * @url https://pota.quack.uy/use/location/addListeners */ export function addListeners(): void; export const location: Readonly<{ protocol: string; origin: string; href: SignalAccessor & { readonly memo?: void; }; pathname: SignalAccessor & { readonly memo?: void; }; path: SignalAccessor & { readonly memo?: void; }; hash: SignalAccessor & { readonly memo?: void; }; search: SignalAccessor & { readonly memo?: void; }; searchParams: { [x: string]: string; [x: number]: string; [x: symbol]: string; } & Record; /** * Reactive params for the caller's enclosing route chain. The * effect/mutable created here are owned by the caller's scope and * disposed automatically when that scope ends. * * Capture once at component setup (`const p = location.params`) and * read keys reactively from `p`. Do not call `location.params` * inline inside a reactive expression — every access creates a * fresh effect+mutable. Must be called inside an owner scope, or * the inner effect is orphaned. */ readonly params: { [x: string]: string; [x: number]: string; [x: symbol]: string; } & Record; }>; export function useBeforeLeave(cb: Function | Promise): void; export { navigateUser as navigate }; /** * Navigates to a new location programmatically * * @param {string} href * @param {{ * params?: object * scroll?: boolean * replace?: boolean * delay?: number * }} options * @url https://pota.quack.uy/use/location/navigate */ declare function navigateUser(href: string, options?: { params?: object; scroll?: boolean; replace?: boolean; delay?: number; }): void; //# sourceMappingURL=location.d.ts.map