Optional
Readonly
format?: Unary<string, FormattedValue>Function to format the question's answer given by the user.
{
format: value => parseInt(value, 18),
}
The question's answer given by the user.
Formatted value.
Readonly
query: stringQuery to show to the user.
Optional
Readonly
retry?: booleanWhether to retry the question if the answer is invalid.
Optional
Readonly
validate?: Unary<FormattedValue, Maybe<string>>Function to validate the question's answer given by the user (after formatting). Returning an string will be used to reject with an error, while an empty string or undefined is considered valid.
{
validate: value => value % 2 === 0,
}
The question's answer given by the user.
Either an error, an empty string or undefined.
Options object for the
question
function.