interface IPoint { start: number; end: number; } export declare class Character { static ParamStart: number; static ParamEnd: number; static ParamNameSeparator: number; } /** * Format URL values in a standard way: * - /a/b/c/d///d/e/f/ to /a/b/c/d/d/e/f/ * - users/ to /users * - /users/ to /users * - users to /users * @param value */ export declare function sanitize(value: string): string; export interface IRouteParam { name: string; /** * Distance between `position.end` and `position.start` */ length: number; /** * It'll be true if the param expression ends with ? */ isOptional: boolean; /** * Position of the param in the original string */ position: IPoint; /** * Regular expression matching just the param value */ paramMatcher: RegExp; /** * Regular expression matching both previous contents * and param. */ matcher: RegExp; /** * Content used in `contentsMatcher` */ previousContents: string; /** * Match the contents from the end of the last param * until the start of the current one. If this is the first param, * then it'll be the contents until the start of this param. */ contentsMatcher: (value: string) => boolean; } export default class Route { private readonly view; private readonly params; readonly original: string; private offset; constructor(original: string); getParams(): ReadonlyMap; resolve(params?: Map): string | undefined; parse(value: string): Map | undefined; private read; private expect; private consume; private peek; private readQuantifierExpression; private readRegExp; private readParam; private eof; } export {}; //# sourceMappingURL=route.d.ts.map