diff --git a/src/public/app/widgets/type_widgets/attachment_list.js b/src/public/app/widgets/type_widgets/attachment_list.ts similarity index 79% rename from src/public/app/widgets/type_widgets/attachment_list.js rename to src/public/app/widgets/type_widgets/attachment_list.ts index f6eadb97e..3018f784b 100644 --- a/src/public/app/widgets/type_widgets/attachment_list.js +++ b/src/public/app/widgets/type_widgets/attachment_list.ts @@ -3,6 +3,7 @@ import AttachmentDetailWidget from "../attachment_detail.js"; import linkService from "../../services/link.js"; import utils from "../../services/utils.js"; import { t } from "../../services/i18n.js"; +import type { EventData } from "../../components/app_context.js"; const TPL = `
@@ -27,6 +28,10 @@ const TPL = `
`; export default class AttachmentListTypeWidget extends TypeWidget { + $list!: JQuery; + $linksWrapper!: JQuery; + renderedAttachmentIds!: Set; + static getType() { return "attachmentList"; } @@ -39,7 +44,10 @@ export default class AttachmentListTypeWidget extends TypeWidget { super.doRender(); } - async doRefresh(note) { + async doRefresh(note: Parameters[0]) { + // TriliumNextTODO: do we need to handle an undefined/null note? + if (!note) return false; + const $helpButton = $(`