refactor(client): use workaround for TS error

This commit is contained in:
Elian Doran 2025-02-23 18:32:53 +02:00
parent 4883debd8d
commit 560b7ebe35
No known key found for this signature in database

View File

@ -10,6 +10,7 @@ import utils from "../../services/utils.js";
import { Dropdown } from "bootstrap";
import type attachmentsApiRoute from "../../../../routes/api/attachments.js"
import type FAttachment from "../../entities/fattachment.js";
import type AttachmentDetailWidget from "../attachment_detail.js";
const TPL = `
<div class="dropdown attachment-actions">
@ -150,10 +151,9 @@ export default class AttachmentActionsWidget extends BasicWidget {
}
async copyAttachmentLinkToClipboardCommand() {
//TriliumNextTODO: the parent here is AttachmentDetailWidget
//how can we pass that to the generic TypedComponent<any>?
//@ts-ignore - TypedComponent<any>
this.parent?.copyAttachmentLinkToClipboard();
if (this.parent && "copyAttachmentLinkToClipboard" in this.parent) {
(this.parent as AttachmentDetailWidget).copyAttachmentLinkToClipboard();
}
}
async deleteAttachmentCommand() {