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

Method message

packages/effect/src/unstable/cli/CliError.ts:399–410  ·  view source on GitHub ↗

* Formats the invalid flag or argument value with the expected input. * * @since 4.0.0

()

Source from the content-addressed store, hash-verified

397 * @since 4.0.0
398 */
399 override get message() {
400 const expectation = this.expected.startsWith("Expected ") || this.expected.startsWith("Expected:")
401 ? this.expected
402 : `Expected: ${this.expected}`
403 if (this.kind === "argument") {
404 return `Invalid value for argument <${this.option}>: "${this.value}". ${expectation}`
405 }
406 if (this.value.length === 0) {
407 return `Missing value for flag --${this.option}. ${expectation}`
408 }
409 return `Invalid value for flag --${this.option}: "${this.value}". ${expectation}`
410 }
411}
412
413/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected