UNPKG

@launchmenu/applet-notes

Version:
36 lines 1.56 kB
import { Command, IMenuItem } from "@launchmenu/core"; import { Note } from "../../dataModel/Note"; import { NotesSource } from "../../dataModel/NotesSource"; import { INoteMetadata } from "../../dataModel/_types/INoteMetadata"; /** * Creates a new menu item to import notes * @param notesSource The notes source to add the item to * @param onCreate A callback for when a note is created * @returns The menu item that can be used to create new notes */ export declare function createImportNoteMenuItem(notesSource: NotesSource, onCreate?: (note: Note, initial: boolean) => void): IMenuItem; /** A command to import a note to a notes source */ export declare class ImportNoteCommand extends Command { metadata: { name: string; }; protected notesSource: NotesSource; protected note: Note; protected path: string; protected noteData: INoteMetadata | undefined; protected onCreate: (note: Note, initial: boolean) => void; /** * Creates a new import note command * @param path The path to the note * @param source The notes source to add the note to * @param onCreate A callback for when the note is created */ constructor(path: string, source: NotesSource, onCreate?: (note: Note, /** Whether it was the first creation, not a redo */ initial: boolean) => void); /** @override */ protected onExecute(): Promise<void>; /** @override */ protected onRevert(): Promise<void>; } //# sourceMappingURL=createImportNoteMenuItem.d.ts.map