/// import { NavigateEvent } from "../spec/navigation"; import { Event } from "../event-target"; import { ErrorFn, PatternErrorFn, PatternRouteFn, PatternThenFn, RouteFn, RouteRecord, RouterListenTarget, ThenFn } from "./types"; declare const Routes: unique symbol; declare const Attached: unique symbol; declare const Detach: unique symbol; declare const Target: unique symbol; declare const TargetType: unique symbol; /** * @internal */ export declare function getRouterRoutes(router: Router): RouteRecord; export declare function isRouter(value: unknown): value is Router; export declare class Router = RouterListenTarget> { #private; [Routes]: RouteRecord; [Attached]: Set>>; [Target]: T; [TargetType]: E["type"]; private listening; constructor(target?: T, type?: E["type"]); routes(pattern: string | URLPattern, router: Router): this; routes(router: Router): this; routes(...args: [string | URLPattern, Router] | [Router]): this; then(pattern: string | URLPattern, fn: PatternThenFn): this; then(pattern: string | URLPattern, fn: PatternThenFn, errorFn: PatternErrorFn): this; then(fn: ThenFn): this; then(fn: ThenFn, catchFn: ErrorFn): this; then(...args: [string | URLPattern, PatternThenFn] | [string | URLPattern, PatternThenFn, PatternErrorFn] | [ThenFn] | [ThenFn, ErrorFn]): this; catch(pattern: string | URLPattern, fn: PatternErrorFn): this; catch(fn: ErrorFn): this; catch(...args: [string | URLPattern, PatternErrorFn] | [ErrorFn]): this; route(pattern: string | URLPattern, fn: PatternRouteFn): this; route(fn: RouteFn): this; route(...args: [string | URLPattern, PatternRouteFn] | [RouteFn]): this; [Detach](router: Router): void; detach: () => void; } export {};