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

Function runConfig

packages/effect/src/cli/Param.ts:1530–1537  ·  view source on GitHub ↗
(error: CliError.MissingOption | CliError.MissingArgument, args: ParsedArgs)

Source from the content-addressed store, hash-verified

1528 kind: error._tag === "MissingOption" ? "flag" : "argument"
1529 })
1530 const runConfig = (error: CliError.MissingOption | CliError.MissingArgument, args: ParsedArgs) =>
1531 Config.option(config).pipe(
1532 Effect.mapError((configError) => toInvalidValue(error, configError)),
1533 Effect.flatMap(Option.match({
1534 onNone: () => Effect.fail(error),
1535 onSome: (value) => Effect.succeed([args.arguments, value as A | B] as const)
1536 }))
1537 )
1538 return transform(
1539 self,
1540 (parse) => (args) =>

Callers 1

Param.tsFile · 0.85

Calls 5

toInvalidValueFunction · 0.85
optionMethod · 0.80
pipeMethod · 0.65
failMethod · 0.65
succeedMethod · 0.45

Tested by

no test coverage detected