diff --git a/apps/client/src/services/froca-interface.ts b/apps/client/src/services/froca-interface.ts index cfb3d076a..156bc684a 100644 --- a/apps/client/src/services/froca-interface.ts +++ b/apps/client/src/services/froca-interface.ts @@ -9,7 +9,7 @@ export interface Froca { branches: Record; attributes: Record; attachments: Record; - blobPromises: Record | null>; + blobPromises: Record | null>; getBlob(entityType: string, entityId: string): Promise; getNote(noteId: string, silentNotFoundError?: boolean): Promise; diff --git a/apps/client/src/services/froca.ts b/apps/client/src/services/froca.ts index c6ad3dc65..131cec06f 100644 --- a/apps/client/src/services/froca.ts +++ b/apps/client/src/services/froca.ts @@ -36,7 +36,7 @@ class FrocaImpl implements Froca { branches!: Record; attributes!: Record; attachments!: Record; - blobPromises!: Record | null>; + blobPromises!: Record | null>; constructor() { this.initializedPromise = this.loadInitialTree(); diff --git a/apps/client/src/types.d.ts b/apps/client/src/types.d.ts index b67be8f42..723697336 100644 --- a/apps/client/src/types.d.ts +++ b/apps/client/src/types.d.ts @@ -21,7 +21,7 @@ interface CustomGlobals { getHeaders: typeof server.getHeaders; getReferenceLinkTitle: (href: string) => Promise; getReferenceLinkTitleSync: (href: string) => string; - getActiveContextNote: () => FNote; + getActiveContextNote: () => FNote | null; requireLibrary: typeof library_loader.requireLibrary; ESLINT: Library; appContext: AppContext; @@ -74,6 +74,9 @@ declare global { type AutoCompleteCallback = (values: AutoCompleteArg[]) => void; interface AutoCompleteArg { + name?: string; + value?: string; + notePathTitle?: string; displayKey?: "name" | "value" | "notePathTitle"; cache?: boolean; source?: (term: string, cb: AutoCompleteCallback) => void, @@ -83,7 +86,7 @@ declare global { } interface JQuery { - autocomplete: (action?: "close" | "open" | "destroy" | "val" | AutoCompleteConfig, args?: object[] | string) => JQuery; + autocomplete: (action?: "close" | "open" | "destroy" | "val" | AutoCompleteConfig, args?: AutoCompleteArg[] | string) => JQuery; getSelectedNotePath(): string | undefined; getSelectedNoteId(): string | null; diff --git a/apps/client/src/widgets/buttons/attachments_actions.ts b/apps/client/src/widgets/buttons/attachments_actions.ts index 8b904d658..bb49b2178 100644 --- a/apps/client/src/widgets/buttons/attachments_actions.ts +++ b/apps/client/src/widgets/buttons/attachments_actions.ts @@ -10,7 +10,7 @@ import utils from "../../services/utils.js"; import { Dropdown } from "bootstrap"; import type FAttachment from "../../entities/fattachment.js"; import type AttachmentDetailWidget from "../attachment_detail.js"; -import { NoteRow } from "@triliumnext/commons"; +import type { NoteRow } from "@triliumnext/commons"; const TPL = /*html*/`