Add save function

This commit is contained in:
2022-06-21 18:44:20 +02:00
parent de0e758ebb
commit 9531ab7006
10 changed files with 99 additions and 30 deletions

View File

@@ -1,4 +1,5 @@
import type { CommandInterface } from ".";
import type { Diary, Project } from "../content/types";
export interface Flag {
short: string;
@@ -19,3 +20,10 @@ export interface Command {
subcommands?: Record<string,SubCommand>;
execute: (flags: string[], args: string[], raw: string, cmdIf: CommandInterface) => string[];
}
export interface CommandInterfaceCallbacks {
setModalVisible?: (visible: boolean) => void;
setModalContent?: (content: Project | Diary, selectedPage?: number) => void;
setModalHTML?: (html: any) => void;
getCmdHistory?: () => string[];
}