dispatch(ch) {
    if (!ch) return this.alert();
    this.value = (this.value || '') + ch;
    this.cursor += 1;
    this.render();
  }
_Using a custom Prompt class_

Custom prompt class - in this example, we create custom prompt by
extending the built-in Prompt class (the base class used by all
Enquirer prompts).

Here we use this custom prompt as a standalone prompt, but you can
also register prompts as plugins on enquirer

(see "custom-prompt-plugin-class.js" example for more details).