import { IRouterContext, Link } from '../../types'; /** * Source: https://github.com/vercel/next.js/blob/031cf7009239be5ebccd8f72418adfd2bb4af5c8/packages/next/src/shared/lib/router/router.ts#L657 * This type is compatible with both versions of Next.js: v13 and v14. */ export type TNext14Router = { pathname: string; basePath: string; query: any; push(...args: any[]): void; replace(...args: any[]): void; events: { on(type: any, handler: (...evts: any[]) => void): void; off(type: any, handler: (...evts: any[]) => void): void; emit(type: any): void; }; }; export declare class NextRouterAdapter implements IRouterContext { private router; private isBlockRun; private blockedUrl; constructor(router: TNext14Router); getCurrentLink(): Link; parseLinkWithQuery(link: Link): Link; redirect(link: Link): void; transfer(link: Link): void; isActive(link: Link): boolean; createHref(link: Link): string; private handleBeforeHistoryChange; listen(listener: (link: Link) => void): () => void; private handleRouterChangeError; block(listener: (link: Link) => void): () => void; } //# sourceMappingURL=NextRouterAdapter.d.ts.map