UNPKG

@wroud/navigation

Version:

A flexible, pattern-matching navigation system for JavaScript applications with built-in routing, browser integration, and navigation state management

16 lines 802 B
import type { IRouteMatcher, RouteMatcherState } from "./IRouteMatcher.js"; import type { IRouter } from "./IRouter.js"; import type { NavigationListener } from "./NavigationListener.js"; export interface INavigation<TMatcher extends IRouteMatcher = IRouteMatcher> { state: RouteMatcherState<TMatcher> | null; history: RouteMatcherState<TMatcher>[]; position: number; readonly router: IRouter<TMatcher>; getState(): RouteMatcherState<TMatcher> | null; replace(state: RouteMatcherState<TMatcher> | null): Promise<void>; navigate(state: RouteMatcherState<TMatcher> | null): Promise<void>; goBack(): Promise<void>; addListener(listener: NavigationListener): () => void; removeListener(listener: NavigationListener): void; } //# sourceMappingURL=INavigation.d.ts.map