MCPcopy
hub / github.com/Effect-TS/effect / choice

Function choice

packages/cli/src/internal/options.ts:261–269  ·  view source on GitHub ↗
(
  name: string,
  choices: C
)

Source from the content-addressed store, hash-verified

259
260/** @internal */
261export 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 */
272export const choiceWithValue = <const C extends ReadonlyArray<[string, any]>>(

Callers

nothing calls this directly

Calls 2

makeSingleFunction · 0.70
mapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…