F

alert

Tells the user something in a dialog with one button, each text a message key.

function alert<T extends PlainMessageKey, B extends keyof Messages = never>(title: T, options?: AlertOptions<T, B>): Promise<void>

Tells the user something in a dialog with one button, each text a message key.

Parameters

NameTypeDescription
titleT

The dialog's message key.

options?AlertOptions<T, B>

The body and confirm keys, and titleVars and bodyVars for keys with placeholders.

Returns

Promise<void>

A promise that resolves once the dialog closes, however it closes.

function alert<T extends VarsMessageKey, B extends keyof Messages = never>(title: T, options: AlertOptions<T, B>): Promise<void>

Tells the user something in a dialog with one button, titled by a key with placeholders.

Parameters

NameTypeDescription
titleT

The dialog's message key.

optionsAlertOptions<T, B>

titleVars, then the body and confirm keys, and bodyVars for a body with placeholders.

Returns

Promise<void>

A promise that resolves once the dialog closes, however it closes.