fix(monorepo/client): wrong data type for autocomplete

This commit is contained in:
Elian Doran 2025-04-18 11:08:22 +03:00
parent 04e51bdfbb
commit e327c918e1
No known key found for this signature in database

View File

@ -74,16 +74,16 @@ declare global {
type AutoCompleteCallback = (values: AutoCompleteArg[]) => void; type AutoCompleteCallback = (values: AutoCompleteArg[]) => void;
interface AutoCompleteArg { interface AutoCompleteArg {
displayKey: "name" | "value" | "notePathTitle"; displayKey?: "name" | "value" | "notePathTitle";
cache?: boolean; cache?: boolean;
source: (term: string, cb: AutoCompleteCallback) => void, source?: (term: string, cb: AutoCompleteCallback) => void,
templates?: { templates?: {
suggestion: (suggestion: Suggestion) => string | undefined suggestion: (suggestion: Suggestion) => string | undefined
} }
}; }
interface JQuery { interface JQuery {
autocomplete: (action?: "close" | "open" | "destroy" | "val" | AutoCompleteConfig, args?: AutoCompleteArg[] | string) => JQuery<HTMLElement>; autocomplete: (action?: "close" | "open" | "destroy" | "val" | AutoCompleteConfig, args?: object[] | string) => JQuery<HTMLElement>;
getSelectedNotePath(): string | undefined; getSelectedNotePath(): string | undefined;
getSelectedNoteId(): string | null; getSelectedNoteId(): string | null;