/** * Interface for how a route parameter should be parsed and serialized. * * @typeParam T The Type this parser should parse to and serialize from */ export interface ParamParser { /** * @param s The string from the url * @returns The parameter parsed to the type T */ parse: (s: string) => T; /** * @param x The value to serialize * @returns The string for the url serialized from the type T */ serialize: (x: T) => string; } /** * Parameter parser for the type `string` */ export declare const stringParser: ParamParser; /** * Parameter parser for the type `number` as a `float` */ export declare const floatParser: ParamParser; /** * Parameter parser for the type `number` as an `int` */ export declare const intParser: ParamParser; /** * Parameter parser for the type `Date` */ export declare const dateParser: ParamParser; /** * Parameter parser for the type `boolean` */ export declare const booleanParser: ParamParser; /** * Parameter parser for a dynamic list of strings * * @param strings - The readonly string[] to parse to and serialize from */ export declare const stringListParser: (strings: T) => ParamParser;