From a858ee31c6c8298ef695856936cf65d3f2295d94 Mon Sep 17 00:00:00 2001 From: Mizah Date: Sun, 17 Nov 2024 14:34:54 +0200 Subject: [PATCH] Added doc comment to alert() --- packages/frontend/src/os.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/frontend/src/os.ts b/packages/frontend/src/os.ts index 92a7e4f2c6..0eb4e2ac53 100644 --- a/packages/frontend/src/os.ts +++ b/packages/frontend/src/os.ts @@ -266,6 +266,15 @@ export function toast(message: string) { }); } +/** + * Displays an alert dialog to the user. + * + * @param {Object} props - The properties for the alert dialog. + * @param {'error' | 'info' | 'success' | 'warning' | 'waiting' | 'question'} [props.type] - The type of the alert. + * @param {string} [props.title] - The title of the alert dialog. + * @param {string} [props.text] - The text content of the alert dialog. + * @returns {Promise} A promise that resolves when the alert dialog is closed. + */ export function alert(props: { type?: 'error' | 'info' | 'success' | 'warning' | 'waiting' | 'question'; title?: string;