This commit is contained in:
Zef Hemel
2023-12-22 13:22:25 +01:00
parent 333eb8c151
commit df83c62dec
6 changed files with 65 additions and 16 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ export type CommandDef = {
export type AppCommand = {
command: CommandDef;
run: (args?: string[]) => Promise<void>;
run: (args?: any[]) => Promise<void>;
};
export type CommandHookT = {
@@ -44,7 +44,7 @@ export class CommandHook extends EventEmitter<CommandHookEvents>
this.editorCommands.set(cmd.name, {
command: cmd,
run: (args?: string[]) => {
return plug.invoke(name, [cmd, ...args??[]]);
return plug.invoke(name, [cmd, ...args ?? []]);
},
});
}