( name: string, choices: C )
| 260 | |
| 261 | /** @internal */ |
| 262 | export const choice = <A extends string, C extends ReadonlyArray<A>>( |
| 263 | name: string, |
| 264 | choices: C |
| 265 | ): Options.Options<C[number]> => { |
| 266 | const primitive = InternalPrimitive.choice( |
| 267 | Arr.map(choices, (choice) => [choice, choice]) |
| 268 | ) |
| 269 | return makeSingle(name, Arr.empty(), primitive) |
| 270 | } |
| 271 | |
| 272 | /** @internal */ |
| 273 | export const choiceWithValue = <const C extends ReadonlyArray<[string, any]>>( |
nothing calls this directly
no test coverage detected