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