import type { EventHandler, ResolvedRoute } from "./pipeline.js"; export declare class InvalidPatternError extends Error { constructor(message: string); } export declare class AmbiguousPatternError extends Error { constructor(message: string); } export interface PatternRouterOptions { /** * Upper bound on cached resolutions. `ce-type` is producer-controlled, so the cache must not * grow once per distinct type seen. Default 1024. */ maxCachedTypes?: number; } /** * Routes a `ce-type` to exactly one handler. * * Supports three shapes: an exact type, a suffix wildcard (`com.example.*`, matching one or more * trailing segments), and the catch-all (`*`). Precedence is exact first, then the wildcard with * the longest literal prefix, then the catch-all — independent of registration order. */ export declare class PatternRouter { private readonly exact; private readonly wildcards; /** Resolved lookups, so patterns are scanned once per type rather than once per message. */ private readonly resolved; private readonly maxCachedTypes; private scans; constructor(entries: Iterable<[string, EventHandler]>, options?: PatternRouterOptions); get stats(): { scans: number; cached: number; }; resolve(type: string): ResolvedRoute | null; private scan; } //# sourceMappingURL=pattern-router.d.ts.map