import type { GlobalRouterEvent } from '../model.js'; export declare const historyPatches: [string, GlobalRouterEvent[]][]; /** * Patches the history object by ensuring correct events are dispatches when the history changes. */ export declare function ensureHistoryEvents(): void; /** * Attaches a global router event after the native function on the object has been invoked. * Stores the original function at the _name. * @param {History} obj - The object to patch. * @param {string} functionName - The name of the function to patch. * @param {GlobalRouterEvent} eventName - The event to dispatch after the function is invoked. */ export declare function attachCallback(obj: any, functionName: string, eventName: GlobalRouterEvent): void; /** * Saves the native function on the history object. * @param {History} obj - The object to save the native function on. * @param {string} name - The name of the function. * @param {() => void} func - The native function to save. */ export declare function saveNativeFunction(obj: any, name: string, func: () => void): void; declare global { interface History { native: { back: (distance?: any) => void; forward: (distance?: any) => void; go: (delta?: any) => void; pushState: (data: any, title?: string, url?: string | null) => void; replaceState: (data: any, title?: string, url?: string | null) => void; }; } }