securityos/node_modules/next/dist/client/router.d.ts

17 lines
746 B
TypeScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
import Router from '../shared/lib/router/router';
import type { NextRouter } from '../shared/lib/router/router';
type SingletonRouterBase = {
router: Router | null;
readyCallbacks: Array<() => any>;
ready(cb: () => any): void;
};
export { Router };
export type { NextRouter };
export type SingletonRouter = SingletonRouterBase & NextRouter;
declare const routerEvents: readonly ["routeChangeStart", "beforeHistoryChange", "routeChangeComplete", "routeChangeError", "hashChangeStart", "hashChangeComplete"];
export type RouterEvent = (typeof routerEvents)[number];
declare const _default: SingletonRouter;
export default _default;
export { default as withRouter } from './with-router';
export declare function useRouter(): NextRouter;