| 45 | * @publicApi |
| 46 | */ |
| 47 | export interface ParamMap { |
| 48 | /** |
| 49 | * Reports whether the map contains a given parameter. |
| 50 | * @param name The parameter name. |
| 51 | * @returns True if the map contains the given parameter, false otherwise. |
| 52 | */ |
| 53 | has(name: string): boolean; |
| 54 | /** |
| 55 | * Retrieves a single value for a parameter. |
| 56 | * @param name The parameter name. |
| 57 | * @return The parameter's single value, |
| 58 | * or the first value if the parameter has multiple values, |
| 59 | * or `null` when there is no such parameter. |
| 60 | */ |
| 61 | get(name: string): string | null; |
| 62 | /** |
| 63 | * Retrieves multiple values for a parameter. |
| 64 | * @param name The parameter name. |
| 65 | * @return An array containing one or more values, |
| 66 | * or an empty array if there is no such parameter. |
| 67 | * |
| 68 | */ |
| 69 | getAll(name: string): string[]; |
| 70 | |
| 71 | /** Names of the parameters in the map. */ |
| 72 | readonly keys: string[]; |
| 73 | } |
| 74 | |
| 75 | class ParamsAsMap implements ParamMap { |
| 76 | private params: Params; |
no outgoing calls
no test coverage detected