Function prompt

  • Prompt the user for input.

    Parameters

    • question: string

      The question to ask the user.

    • Optional callback: ((input) => string)

      A callback function. If it returns an empty string, the user is prompted again. Print any desired error messages to user inside the callback function. If the callback does not return an empty string, that string is returned.

        • (input): string
        • Parameters

          • input: string

          Returns string

    Returns Promise<string>

Generated using TypeDoc