( kind: Kind, name: string )
| 870 | * @since 4.0.0 |
| 871 | */ |
| 872 | export const keyValuePair = <Kind extends ParamKind>( |
| 873 | kind: Kind, |
| 874 | name: string |
| 875 | ): Param<Kind, Record<string, string>> => |
| 876 | map( |
| 877 | variadic( |
| 878 | makeSingle({ |
| 879 | name, |
| 880 | primitiveType: Primitive.keyValuePair, |
| 881 | kind |
| 882 | }), |
| 883 | { min: 1 } |
| 884 | ), |
| 885 | (objects) => Object.fromEntries(objects.flatMap(Object.entries)) |
| 886 | ) |
| 887 | |
| 888 | /** |
| 889 | * Creates an empty sentinel parameter that always fails to parse. |
nothing calls this directly
no test coverage detected