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

Function runConfig

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

Source from the content-addressed store, hash-verified

1398 kind: error._tag === "MissingOption" ? "flag" : "argument"
1399 })
1400 const runConfig = (error: CliError.MissingOption | CliError.MissingArgument, args: ParsedArgs) =>
1401 Config.option(config).pipe(
1402 Effect.mapError((configError) => toInvalidValue(error, configError)),
1403 Effect.flatMap(Option.match({
1404 onNone: () => Effect.fail(error),
1405 onSome: (value) => Effect.succeed([args.arguments, value as A | B] as const)
1406 }))
1407 )
1408 return transform(
1409 self,
1410 (parse) => (args) =>

Callers 1

Param.tsFile · 0.85

Calls 5

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

Tested by

no test coverage detected