Displays a question box for the user.

  • Parameters

    • message: string

      The message/question to display.

    • title: string

      The dialog title.

    • Optionalbuttons: string[]

      Captions of the buttons that should be present, defaults to ['Yes', 'No'].

    • OptionaldefaultId: number

      Index of the button in the buttons array which will be selected by default when the message box opens.

    • OptionalcancelId: number

      The index of the button to be used to cancel the dialog, via the Esc key. By default this is assigned to the first button with "cancel" or "no" as the label. If no such labeled buttons exist and this option is not set, 0 will be used as the return value.

    Returns Promise<number>

    The index of the button that was clicked.