Skip to content

PromptResult ​

The raw result returned by a prompt engine for a single prompt.

  • answered: true — user provided a value
  • answered: false — no answer; cancellation unless reason: 'invalid'

Coercion to the flag's kind is the resolver's responsibility, not the prompt engine's.

Signatures ​

ts
type PromptResult = { answered: true; value: unknown; } | { answered: false; reason?: "invalid"; };

See Also ​

Released under the MIT License.