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

Function handle

packages/effect/src/unstable/cli/internal/command.ts:119–125  ·  view source on GitHub ↗
(
    input: Input,
    commandPath: ReadonlyArray<string>
  )

Source from the content-addressed store, hash-verified

117 const subcommands = options.subcommands ?? []
118
119 const handle = (
120 input: Input,
121 commandPath: ReadonlyArray<string>
122 ): Effect.Effect<void, CliError.CliError | E, R | Environment> =>
123 Predicate.isNotUndefined(options.handle)
124 ? options.handle(input, commandPath)
125 : Effect.fail(new CliError.ShowHelp({ commandPath, errors: [] }))
126
127 const parse = options.parse ?? makeParser(config) as any
128 const parseContext = options.parseContext ?? makeParser(contextConfig, { allowLeftovers: true }) as any

Callers

nothing calls this directly

Calls 2

handleMethod · 0.65
failMethod · 0.45

Tested by

no test coverage detected