Skip to content

Function: confirm() ​

confirm(message): boolean

Defined in: interaction.ts:191

Displays a confirmation dialog and returns true if the user confirmed, false otherwise.

Parameters ​

message ​

string

The message to display in the confirmation dialog.

Returns ​

boolean

Returns true if the user clicked OK, false if they clicked Cancel.

Example ​

ts
if (facile.confirm('Are you sure?')) {
  facile.say('Confirmed!');
}