NativeScript 9.1 Released → V8 14.9, Vite 8 HMR, built for rapid agentic visual iteration
Dig in

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>