From 897dffa5984a503ceeb74fc9c07754d35dd18e27 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sat, 4 May 2024 15:07:10 -0700 Subject: [PATCH] poll_modal: Fix implicit use of any. Signed-off-by: Anders Kaseorg --- web/src/poll_modal.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web/src/poll_modal.ts b/web/src/poll_modal.ts index 269ee04e7e..b84542fbaf 100644 --- a/web/src/poll_modal.ts +++ b/web/src/poll_modal.ts @@ -9,20 +9,20 @@ function create_option_row($last_option_row_input: JQuery): void { $row_container.append($(row_html)); } -function add_option_row(e: JQuery.TriggeredEvent): void { +function add_option_row(this: HTMLElement): void { // if the option triggering the input event e is not the last, // that is, its next sibling has the class `option-row`, we // do not add a new option row and return from this function // This handles a case when the next empty input row is already // added and user is updating the above row(s). - if ($(e.target).closest(".option-row").next().hasClass("option-row")) { + if ($(this).closest(".option-row").next().hasClass("option-row")) { return; } - create_option_row($(e.target)); + create_option_row($(this)); } -function delete_option_row(e: JQuery.ClickEvent): void { - const $row = $(e.target).closest(".option-row"); +function delete_option_row(this: HTMLElement): void { + const $row = $(this).closest(".option-row"); $row.remove(); }