@wroud/navigation
Version:
A flexible, pattern-matching navigation system for JavaScript applications with built-in routing, browser integration, and navigation state management
16 lines (14 loc) • 588 B
text/typescript
import type { INavigation } from "../INavigation.js";
import type { IRouteMatcher } from "../IRouteMatcher.js";
import type { TriePatternMatching } from "./TriePatternMatching.js";
import type { IPatternRouteState } from "./types.js";
export interface IPatternNavigation<
TMatcher extends IRouteMatcher = TriePatternMatching,
> extends INavigation<TMatcher> {
replace<Pattern extends string = string>(
state: IPatternRouteState<Pattern> | null,
): Promise<void>;
navigate<Pattern extends string = string>(
state: IPatternRouteState<Pattern> | null,
): Promise<void>;
}