ts: Convert confirm_dialog module to TypeScript.

This commit is contained in:
Lalit
2023-05-18 19:31:57 +05:30
committed by Tim Abbott
parent 271df2c98e
commit a3f46957bc
3 changed files with 5 additions and 4 deletions

View File

@@ -43,7 +43,7 @@ import * as ui_report from "./ui_report";
* to DOM, it can do so by passing a post_render hook.
*/
type WidgetConfig = {
export type DialogWidgetConfig = {
html_heading: string;
html_body: string;
on_click: (e: unknown) => void;
@@ -97,7 +97,7 @@ export function close_modal(on_hidden_callback?: () => void): void {
overlays.close_modal("dialog_widget_modal", {on_hidden: on_hidden_callback});
}
export function launch(conf: WidgetConfig): void {
export function launch(conf: DialogWidgetConfig): void {
// Mandatory fields:
// * html_heading
// * html_body