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

Function missingFlagValue

packages/effect/src/unstable/cli/internal/parser.ts:394–404  ·  view source on GitHub ↗
(spec: FlagParam)

Source from the content-addressed store, hash-verified

392 })
393
394const missingFlagValue = (spec: FlagParam): CliError.InvalidValue => {
395 const choices = Primitive.getChoiceKeys(spec.primitiveType)
396 return new CliError.InvalidValue({
397 option: spec.name,
398 value: "",
399 expected: choices === undefined
400 ? spec.typeName ?? Primitive.getTypeName(spec.primitiveType)
401 : choices.join(" | "),
402 kind: "flag"
403 })
404}
405
406/**
407 * Checks whether a token is a boolean literal value.

Callers 1

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected