export type Keys = { name: string; optional: boolean; }[]; export declare class Emitter { private _callbacks; on(event: string, fn: Function): this; emit(event: string, ...args: any[]): this; off(event: string, fn?: Function): this; } export declare class Route { private _regex; private _params; readonly path: string; readonly keys: Keys; constructor(path: string); match(path: string, params: string[]): boolean; private _pathParse; } export declare class Router extends Emitter { static default: Router; static route(path: string, handler: Function): Router; static navigate(path: string, force?: boolean): Router; static start(): Router; static hash(): string; static handle(hash: string): Router; private _routes; constructor(); route(path: string, handler: Function): this; navigate(path: string, force?: boolean): this; start(): this; hash(): string; handle(hash: string): this; private _onHashChange; } export declare function route(path: string, handler: Function): Router;