mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
refactor(client): use workaround for TS error
This commit is contained in:
parent
4883debd8d
commit
560b7ebe35
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user