( params: ReadonlyRecord<string, string | Array<string>>, ast: AST.AST )
| 630 | * @internal |
| 631 | */ |
| 632 | export function normalizeUrlParams( |
| 633 | params: ReadonlyRecord<string, string | Array<string>>, |
| 634 | ast: AST.AST |
| 635 | ): ReadonlyRecord<string, string | Array<string>> { |
| 636 | const out: Record<string, string | Array<string>> = {} |
| 637 | for (const key in params) { |
| 638 | const value = params[key] |
| 639 | out[key] = Array.isArray(value) || isSingleStringType(ast, key) ? value : [value] |
| 640 | } |
| 641 | return out |
| 642 | } |
| 643 | |
| 644 | const handlerToRoute = ( |
| 645 | endpoint_: HttpApiEndpoint.HttpApiEndpoint.Any, |
no test coverage detected