<types namespace="_reloquent">
  <import name="ReadLineOptions" from="readline" />
  <record name="Question" extends="readline.ReadLineOptions" desc="A question.">
    <prop string name="text">
      The text to show to the user.
    </prop>
    <prop opt string name="defaultValue">
      The default answer to the question.
    </prop>
    <fn opt name="getDefault" return="(string|!Promise<string>)">
      The function which will get the default value, possibly asynchronously.
    </fn>
    <fn opt name="validation" void>
      <arg string name="answer">The received answer.</arg>
      The validation function which should throw on error.
    </fn>
    <fn opt name="postProcess" return="(string|!Promise<string>)">
      <arg string name="answer">The received answer.</arg>
      The transformation function for the answer.
    </fn>
    <prop name="password" boolean default="false">
      Hide the inputs behind `*` when typing the answer.
    </prop>
  </record>
  <type name="Questions" type="!Object<string, string|!_reloquent.Question>" desc="A set of questions." />
</types>