9.0 Released! → Native ESM runtimes 🚀, Vite support ⚡️, multi-window apps and more...
Read Announcement

Call Signature

ts
function alert(message: string | number | boolean): Promise<void>;

Defined in: ui/dialogs/index.d.ts:66

The alert() method displays an alert box with a specified message.

Parameters

ParameterTypeDescription
messagestring | number | booleanSpecifies the text to display in the alert box.

Returns

Promise<void>

Call Signature

ts
function alert(options: AlertOptions): Promise<void>;

Defined in: ui/dialogs/index.d.ts:72

The alert() method displays an alert box with a specified message.

Parameters

ParameterTypeDescription
optionsAlertOptionsSpecifies the options for the alert box.

Returns

Promise<void>