summaryrefslogtreecommitdiff
path: root/apps/web/src/lib/commands/base-command.ts
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/src/lib/commands/base-command.ts')
-rw-r--r--apps/web/src/lib/commands/base-command.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/web/src/lib/commands/base-command.ts b/apps/web/src/lib/commands/base-command.ts
index 66062c52..a8ce1d34 100644
--- a/apps/web/src/lib/commands/base-command.ts
+++ b/apps/web/src/lib/commands/base-command.ts
@@ -1,11 +1,17 @@
+import type { ElementRef } from "@/lib/timeline/types";
+
+export interface CommandResult {
+ select?: ElementRef[];
+}
+
export abstract class Command {
- abstract execute(): void;
+ abstract execute(): CommandResult | undefined;
undo(): void {
throw new Error("Undo not implemented for this command");
}
- redo(): void {
- this.execute();
+ redo(): CommandResult | undefined {
+ return this.execute();
}
}