chore(ts): get rid of bootstrap related ts-ignores

This commit is contained in:
Panagiotis Papadopoulos
2025-02-12 08:28:29 +01:00
parent 3c83112240
commit cf11be7f35
2 changed files with 5 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
import dayjs from "dayjs";
import { Modal } from "bootstrap";
function reloadFrontendApp(reason?: string) {
if (reason) {
@@ -244,9 +245,7 @@ function getMimeTypeClass(mime: string) {
function closeActiveDialog() {
if (glob.activeDialog) {
// TODO: Fix once we use proper ES imports.
//@ts-ignore
bootstrap.Modal.getOrCreateInstance(glob.activeDialog[0]).hide();
Modal.getOrCreateInstance(glob.activeDialog[0]).hide();
glob.activeDialog = null;
}
}
@@ -288,9 +287,7 @@ async function openDialog($dialog: JQuery<HTMLElement>, closeActDialog = true) {
}
saveFocusedElement();
// TODO: Fix once we use proper ES imports.
//@ts-ignore
bootstrap.Modal.getOrCreateInstance($dialog[0]).show();
Modal.getOrCreateInstance($dialog[0]).show();
$dialog.on("hidden.bs.modal", () => {
const $autocompleteEl = $(".aa-input");