declare global { interface Window { _routerInitialized: Symbol; } } /** * 检查即将进入的路由,是前进还是后退 */ export declare function direction(fromPath: string): 'forward' | 'backward'; export declare function historyLength(): number; export declare function historyDepth(url: string): number; export declare function init(): void; export declare const router: { init: typeof init; direction: typeof direction; historyDepth: typeof historyDepth; historyLength: typeof historyLength; };