MCPcopy Create free account
hub / github.com/Effect-TS/effect / choiceWithValue

Function choiceWithValue

packages/effect/src/unstable/cli/Param.ts:544–552  ·  view source on GitHub ↗
(kind: Kind, name: string, choices: Choices)

Source from the content-addressed store, hash-verified

542 * @since 4.0.0
543 */
544export const choiceWithValue = <
545 const Kind extends ParamKind,
546 const Choices extends ReadonlyArray<readonly [string, any]>
547>(kind: Kind, name: string, choices: Choices): Param<Kind, Choices[number][1]> =>
548 makeSingle({
549 name,
550 primitiveType: Primitive.choice(choices),
551 kind
552 })
553
554/**
555 * Constructs command-line params that represent a choice between several

Callers 1

choiceFunction · 0.70

Calls 1

makeSingleFunction · 0.70

Tested by

no test coverage detected