A map that provides access to the required and optional parameters specific to a route. The map supports retrieving a single value with get() or multiple values with getAll().
API
interface ParamMap {
has(name: string): boolean;
get(name: string): string | null;
getAll(name: string): string[];
readonly keys: string[];
}
has
booleanReports whether the map contains a given parameter.
@paramname
stringThe parameter name.
@returns
boolean
get
string | nullRetrieves a single value for a parameter.
@paramname
stringThe parameter name.
@returns
string | null
getAll
string[]Retrieves multiple values for a parameter.
@paramname
stringThe parameter name.
@returns
string[]
keys
string[]Names of the parameters in the map.