( params: ReadonlyRecord<string, string | Array<string>>, ast: AST.AST )
| 641 | * @internal |
| 642 | */ |
| 643 | export function normalizeUrlParams( |
| 644 | params: ReadonlyRecord<string, string | Array<string>>, |
| 645 | ast: AST.AST |
| 646 | ): ReadonlyRecord<string, string | Array<string>> { |
| 647 | const out: Record<string, string | Array<string>> = {} |
| 648 | for (const key in params) { |
| 649 | const value = params[key] |
| 650 | out[key] = Array.isArray(value) || isSingleStringType(ast, key) ? value : [value] |
| 651 | } |
| 652 | return out |
| 653 | } |
| 654 | |
| 655 | const handlerToRoute = ( |
| 656 | endpoint_: HttpApiEndpoint.HttpApiEndpoint.Any, |
no test coverage detected