@wroud/navigation
Version:
A flexible, pattern-matching navigation system for JavaScript applications with built-in routing, browser integration, and navigation state management
15 lines (12 loc) • 297 B
text/typescript
import type { IRouteState } from "./IRouteState.js";
export enum NavigationType {
Navigate = "navigate",
Replace = "replace",
Back = "back",
Forward = "forward",
}
export type NavigationListener = (
type: NavigationType,
from: IRouteState | null,
to: IRouteState | null
) => void;